Versions in this module Expand all Collapse all v0 v0.2.1 Jul 31, 2018 Changes in this version + func RequireAttribute(name, value string) func(http.Handler) http.Handler + func WithToken(ctx context.Context, token *AuthorizationToken) context.Context + type Attributes map[string][]string + func (a Attributes) Get(key string) string + type AuthorizationToken struct + Attributes Attributes + func Token(ctx context.Context) *AuthorizationToken + type ClientCookies struct + Domain string + Name string + Secure bool + ServiceProvider *saml.ServiceProvider + func (c ClientCookies) DeleteState(w http.ResponseWriter, r *http.Request, id string) error + func (c ClientCookies) GetState(r *http.Request, id string) string + func (c ClientCookies) GetStates(r *http.Request) map[string]string + func (c ClientCookies) GetToken(r *http.Request) string + func (c ClientCookies) SetState(w http.ResponseWriter, r *http.Request, id string, value string) + func (c ClientCookies) SetToken(w http.ResponseWriter, r *http.Request, value string, maxAge time.Duration) + type ClientState interface + DeleteState func(w http.ResponseWriter, r *http.Request, id string) error + GetState func(r *http.Request, id string) string + GetStates func(r *http.Request) map[string]string + SetState func(w http.ResponseWriter, r *http.Request, id string, value string) + type ClientToken interface + GetToken func(r *http.Request) string + SetToken func(w http.ResponseWriter, r *http.Request, value string, maxAge time.Duration) + type Middleware struct + AllowIDPInitiated bool + ClientState ClientState + ClientToken ClientToken + ServiceProvider saml.ServiceProvider + TokenMaxAge time.Duration + func New(opts Options) (*Middleware, error) + func (m *Middleware) Authorize(w http.ResponseWriter, r *http.Request, assertion *saml.Assertion) + func (m *Middleware) GetAuthorizationToken(r *http.Request) *AuthorizationToken + func (m *Middleware) IsAuthorized(r *http.Request) bool + func (m *Middleware) RequireAccount(handler http.Handler) http.Handler + func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Options struct + AllowIDPInitiated bool + Certificate *x509.Certificate + CookieMaxAge time.Duration + CookieSecure bool + EntityID string + ForceAuthn bool + HTTPClient *http.Client + IDPMetadata *saml.EntityDescriptor + IDPMetadataURL *url.URL + Key *rsa.PrivateKey + Logger logger.Interface + NoDestinationCheck bool + URL url.URL