Documentation ¶
Overview ¶
Package keystone contains identity providers that validate against keystone servers.
Index ¶
- func NewIdentityProvider(p Params) idp.IdentityProvider
- func NewTokenIdentityProvider(p Params) idp.IdentityProvider
- func NewUserpassIdentityProvider(p Params) idp.IdentityProvider
- func NewV3TokenIdentityProvider(p Params) idp.IdentityProvider
- type Params
- type Token
- type TokenInteractionInfo
- type TokenLoginRequest
- type TokenLoginResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIdentityProvider ¶
func NewIdentityProvider(p Params) idp.IdentityProvider
NewIdentityProvider creates an interactive keystone identity provider with the configuration defined by p.
func NewTokenIdentityProvider ¶
func NewTokenIdentityProvider(p Params) idp.IdentityProvider
NewTokenIdentityProvider creates a idp.IdentityProvider which will authenticate against a keystone server using existing tokens.
func NewUserpassIdentityProvider ¶
func NewUserpassIdentityProvider(p Params) idp.IdentityProvider
NewTokenIdentityProvider creates a idp.IdentityProvider which will authenticate against a keystone server using a httpbakery.form compatible login method.
func NewV3TokenIdentityProvider ¶
func NewV3TokenIdentityProvider(p Params) idp.IdentityProvider
NewV3TokenIdentityProvider creates a idp.IdentityProvider which will authenticate against a keystone (version 3) server using existing tokens.
Types ¶
type Params ¶
type Params struct { // Name is the name that the identity provider will have within // the identity manager. The name is used as part of the url for // communicating with the identity provider. Name string `yaml:"name"` // If Domain is set it will be appended to any usernames or // groups provided by the identity provider. A user created by // this identity provide would be username@domain. Domain string `yaml:"domain"` // Description is a human readable description that will be used // if a list of providers is shown for a user to choose. Description string `yaml:"description"` // URL is the address of the keystone server. URL string `yaml:"url"` }
Params holds the parameters to use with keystone identity providers.
type Token ¶
type Token struct { Login struct { Domain idName `json:"domain"` User idName `json:"user"` Tenant idName `json:"tenant"` ID string `json:"id"` } `json:"login"` }
Token is the token sent to use to login to the keystone server. The only part that is used is Login.ID.
type TokenInteractionInfo ¶
type TokenInteractionInfo struct {
URL string `json:"url"`
}
TokenInteractionInfo is the interaction info for a token interactor.
type TokenLoginRequest ¶
type TokenLoginRequest struct { httprequest.Route `httprequest:"POST"` Token Token `httprequest:",body"` }
TokenLoginRequest is the request sent for a token login.
type TokenLoginResponse ¶
type TokenLoginResponse struct {
DischargeToken *httpbakery.DischargeToken `json:"discharge-token"`
}
TokenLoginResponse is the response sent for a token login.