server

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//RancherClient is the client configured to connect to Cattle
	RancherClient *client.RancherClient

	//IDPMetadataFile is the path to the metadata file of the Shibboleth IDP
	IDPMetadataFile string
	//SamlServiceProvider is the handle to the SamlServiceProvider configured by the router
	SamlServiceProvider *model.RancherSamlServiceProvider

	CattleURL string
)

Functions

func CreateToken

func CreateToken(json map[string]string) (model.Token, int, error)

CreateToken will authenticate with provider and create a jwt token

func GetConfig

func GetConfig(accessToken string, listOnly bool) (model.AuthConfig, error)

GetConfig gets the config from DB, gathers the list of settings to read from DB

func GetIdentities

func GetIdentities(accessToken string) ([]client.Identity, error)

GetIdentities will list all identities for token

func GetIdentity

func GetIdentity(externalID string, externalIDType string, accessToken string) (client.Identity, error)

GetIdentity will list all identities for given filters

func GetRancherAPIHost added in v0.1.0

func GetRancherAPIHost() string

GetRancherAPIHost reads the api.host setting

func GetRedirectURL

func GetRedirectURL() (map[string]string, error)

GetRedirectURL returns the redirect URL for the provider if applicable

func GetSamlRedirectURL added in v0.1.1

func GetSamlRedirectURL(redirectBackBase string, redirectBackPath string) string

GetSamlRedirectURL returns the redirect URL for SAML login flow

func RefreshToken

func RefreshToken(json map[string]string) (model.Token, int, error)

RefreshToken will refresh a jwt token

func Reload

func Reload(fromUpdate bool) (bool, error)

Reload will reload the config from DB and reinit the provider

func SearchIdentities

func SearchIdentities(name string, exactMatch bool, accessToken string) ([]client.Identity, error)

SearchIdentities will list all identities for given filters

func SetEnv

func SetEnv(c *cli.Context)

SetEnv sets the parameters necessary

func TestLogin added in v0.4.3

func TestLogin(testAuthConfig model.TestAuthConfig, accessToken string, token string) (int, error)

func URLEncoded

func URLEncoded(str string) string

URLEncoded escape url query

func UpdateConfig

func UpdateConfig(authConfig model.AuthConfig) error

UpdateConfig updates the config in DB

func UpgradeCase added in v0.4.5

func UpgradeCase() error

func UpgradeSettings

func UpgradeSettings() error

UpgradeSettings upgrades the existing provider specific auth settings to the new generic settings used by this service

Types

type AESSecret added in v0.4.5

type AESSecret struct {
	Nonce      []byte
	CipherText []byte
}

Jump to

Keyboard shortcuts

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