service

package
v0.4.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(w http.ResponseWriter, r *http.Request)

CreateToken is a handler for route /token and returns the jwt token after authenticating the user

func DoSamlLogout added in v0.1.1

func DoSamlLogout(w http.ResponseWriter, r *http.Request)

DoSamlLogout redirects to Saml Logout

func GetConfig

func GetConfig(w http.ResponseWriter, r *http.Request)

GetConfig is a handler for GET /config, lists the provider config

func GetIdentities

func GetIdentities(w http.ResponseWriter, r *http.Request)

GetIdentities is a handler for route /me/identities and returns group memberships and details of the user

func GetRedirectParams added in v0.4.33

func GetRedirectParams(w http.ResponseWriter, r *http.Request, serviceProvider *model.RancherSamlServiceProvider) (redirectBackBaseValue string,
	redirectBackPathValue string)

func GetRedirectURL

func GetRedirectURL(w http.ResponseWriter, r *http.Request)

GetRedirectURL gets the redirect URL

func HandleSamlAssertion added in v0.4.28

func HandleSamlAssertion(w http.ResponseWriter, r *http.Request, assertion *saml.Assertion, serviceProvider *model.RancherSamlServiceProvider)

HandleSamlAssertion processes/handles the assertion obtained by the POST to /saml/acs from IdP

func HandleSamlLogin added in v0.4.28

func HandleSamlLogin(w http.ResponseWriter, r *http.Request)

HandleSamlLogin is the endpoint for /saml/login endpoint

func NewRouter

func NewRouter() *mux.Router

NewRouter creates and configures a mux router

func PostSamlTokenHTML added in v0.4.30

func PostSamlTokenHTML(w http.ResponseWriter, r *http.Request)

func Reload

func Reload(w http.ResponseWriter, r *http.Request)

Reload is a handler for POST /reloadconfig, reloads the config from Cattle database and initializes the provider

func ReturnHTTPError

func ReturnHTTPError(w http.ResponseWriter, r *http.Request, httpStatus int, errorMessage string)

ReturnHTTPError handles sending out CatalogError response

func SearchIdentities

func SearchIdentities(w http.ResponseWriter, r *http.Request)

SearchIdentities is a handler for route /identities and filters (id + type or name) and returns the search results using the passed filters

func ServeHTTP added in v0.4.28

func ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP is the handler for /saml/metadata and /saml/acs endpoints

func TestLogin added in v0.4.3

func TestLogin(w http.ResponseWriter, r *http.Request)

TestLogin is a test API to check login with code before saving settings to db

func UpdateConfig

func UpdateConfig(w http.ResponseWriter, r *http.Request)

UpdateConfig is a handler for POST /config, loads the provider with the config and saves the config back to Cattle database

Types

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

Route defines the properties of a go mux http route

type Routes

type Routes []Route

Routes array of Route defined

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL