Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthProvider ¶
type AuthProvider struct { Name string `json:"-"` CommonParameters Azure *AzureIdp `json:"azure,omitempty"` UI *UserInterface `json:"ui,omitempty"` // contains filtered or unexported fields }
AuthProvider authenticates requests the SAML Response to the SP Assertion Consumer Service using the HTTP-POST Binding.
func (AuthProvider) Authenticate ¶
func (m AuthProvider) Authenticate(w http.ResponseWriter, r *http.Request) (caddyauth.User, bool, error)
Authenticate validates the user credentials in and returns a user identity, if valid.
func (AuthProvider) CaddyModule ¶
func (AuthProvider) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*AuthProvider) Provision ¶
func (m *AuthProvider) Provision(ctx caddy.Context) error
Provision provisions SAML authentication provider
func (*AuthProvider) Validate ¶
func (m *AuthProvider) Validate() error
Validate implements caddy.Validator.
type AzureIdp ¶
type AzureIdp struct { CommonParameters Enabled bool `json:"enabled,omitempty"` ServiceProviders []*samllib.ServiceProvider `json:"-"` IdpMetadataLocation string `json:"idp_metadata_location,omitempty"` IdpMetadataURL *url.URL `json:"-"` IdpSignCertLocation string `json:"idp_sign_cert_location,omitempty"` TenantID string `json:"tenant_id,omitempty"` ApplicationID string `json:"application_id,omitempty"` ApplicationName string `json:"application_name,omitempty"` // LoginURL is the link to Azure AD authentication portal. // The link is auto-generated based on Azure AD tenant and // application IDs. LoginURL string `json:"-"` // EntityID is the "Identifier (Entity ID)" an administrator // specifies in "Set up Single Sign-On with SAML" in Azure AD // Enterprise Applications. EntityID string `json:"entity_id,omitempty"` // AcsURL is the list of URLs server instance is listening on. These URLS // are known as SP Assertion Consumer Service endpoints. For example, // users may access a website via http://app.domain.local. At the // same time the users may access it by IP, e.g. http://10.10.10.10. or // by name, i.e. app. Each of the URLs is a separate endpoint. AssertionConsumerServiceURLs []string `json:"acs_urls,omitempty"` // contains filtered or unexported fields }
AzureIdp authenticates request from Azure AD.
func (*AzureIdp) Authenticate ¶
Authenticate parses and validates SAML Response originating at Azure Active Directory.
type CommonParameters ¶
type CommonParameters struct { AuthURLPath string `json:"auth_url_path,omitempty"` SuccessURLPath string `json:"success_url_path,omitempty"` Jwt TokenParameters `json:"jwt,omitempty"` }
CommonParameters represent a common set of configuration settings, e.g. authentication URL, Success Redirect URL, JWT token name and secret, etc.
type TokenParameters ¶
type TokenParameters struct { TokenName string `json:"token_name,omitempty"` TokenSecret string `json:"token_secret,omitempty"` TokenIssuer string `json:"token_issuer,omitempty"` }
TokenParameters represent JWT parameters of CommonParameters.
type UserClaims ¶
type UserClaims struct { Audience string `json:"aud,omitempty"` ExpiresAt int64 `json:"exp,omitempty"` ID string `json:"jti,omitempty"` IssuedAt int64 `json:"iat,omitempty"` Issuer string `json:"iss,omitempty"` NotBefore int64 `json:"nbf,omitempty"` Subject string `json:"sub,omitempty"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Roles []string `json:"roles,omitempty"` Origin string `json:"origin,omitempty"` }
UserClaims represents custom and standard JWT claims.
func (UserClaims) AsMap ¶
func (u UserClaims) AsMap() map[string]interface{}
AsMap converts UserClaims struct to dictionary.
type UserInterface ¶
type UserInterface struct { TemplateLocation string `json:"template_location,omitempty"` AllowRoleSelection bool `json:"allow_role_selection,omitempty"` Template *template.Template `json:"-"` Title string `json:"title,omitempty"` LogoURL string `json:"logo_url,omitempty"` LogoDescription string `json:"logo_description"` Links []userInterfaceLink `json:"-"` AuthEndpoint string `json:"-"` LocalAuthEnabled bool `json:"local_auth_enabled"` }
UserInterface represents a set of configuration settings for user interface and associated methods