Documentation
¶
Index ¶
- Constants
- func NewSAMLSecurity(spMiddleware *samlsp.Middleware, samlConf *config.SAMLConfig) chain.SecurityChainMiddleware
- func NewSAMLSecurityMiddleware(spMiddleware *samlsp.Middleware, samlConfig *config.SAMLConfig) goa.Middleware
- func RedirectUser(spMiddleware *samlsp.Middleware, rw http.ResponseWriter, req *http.Request)
- func RegisterSP(spMiddleware *samlsp.Middleware, conf *config.SAMLConfig) (func(), error)
- func UnregisterSP(spMiddleware *samlsp.Middleware, conf *config.SAMLConfig)
- type EmailPayload
- type TokenClaims
- type UserPayload
Constants ¶
View Source
const ( // SAMLSecurityType is the name of the security type (JWT, OAUTH2, SAML...) SAMLSecurityType = "SAML" // CookieName name for saml token CookieName = "token" )
Variables ¶
This section is empty.
Functions ¶
func NewSAMLSecurity ¶
func NewSAMLSecurity(spMiddleware *samlsp.Middleware, samlConf *config.SAMLConfig) chain.SecurityChainMiddleware
NewSAMLSecurity creates a SAML SecurityChainMiddleware using RSA private key.
func NewSAMLSecurityMiddleware ¶
func NewSAMLSecurityMiddleware(spMiddleware *samlsp.Middleware, samlConfig *config.SAMLConfig) goa.Middleware
NewSAMLSecurityMiddleware creates a middleware that checks for the presence of a cookie and validates its content. It also serve SP metadata on /saml/metadata route and SAML Assertion Consumer Service on /saml/acs route.
func RedirectUser ¶
func RedirectUser(spMiddleware *samlsp.Middleware, rw http.ResponseWriter, req *http.Request)
RedirectUser redirects user to the IdP that is set in the metadata
func RegisterSP ¶
func RegisterSP(spMiddleware *samlsp.Middleware, conf *config.SAMLConfig) (func(), error)
RegisterSP sends SP metadata to the SAML IdP
func UnregisterSP ¶
func UnregisterSP(spMiddleware *samlsp.Middleware, conf *config.SAMLConfig)
UnregisterSP deletes SP from SAML IdP
Types ¶
type EmailPayload ¶
type EmailPayload struct { // Email of the user Email string }
EmailPayload holds the email payload
type TokenClaims ¶
TokenClaims SAML claims
type UserPayload ¶
type UserPayload struct { // Status of user account Active bool `form:"active" json:"active" xml:"active"` // Email of user Email string `form:"email" json:"email" xml:"email"` // External id of user ExternalID string `form:"externalId,omitempty" json:"externalId,omitempty" xml:"externalId,omitempty"` // Full name of user Fullname string `form:"fullname" json:"fullname" xml:"fullname"` // Roles of user Roles []string `form:"roles" json:"roles" xml:"roles"` }
UserPayload is the user payload
Click to show internal directories.
Click to hide internal directories.