Documentation
¶
Index ¶
- type Config
- type Provider
- func (p *Provider) AuthURL(state, redirectURI string) (string, error)
- func (p *Provider) AuthURLWithID(state, redirectURI string) (authURL, requestID string, err error)
- func (p *Provider) DisplayName() string
- func (p *Provider) EphemeralKey() bool
- func (p *Provider) Exchange(ctx context.Context, code, redirectURI string) (identity.FederatedClaims, error)
- func (p *Provider) ExchangeAssertion(ctx context.Context, response, redirectURI string, possibleRequestIDs []string) (identity.FederatedClaims, error)
- func (p *Provider) MetadataXML() ([]byte, error)
- func (p *Provider) Name() string
- func (p *Provider) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ID string
DisplayName string
EntityID string // SP entity ID; defaults to MetadataURL
MetadataURL string // public SP metadata URL
ACSURL string // Assertion Consumer Service (callback) URL
IDPMetadataURL string
IDPMetadataXML string
SPCertPEM string
SPKeyPEM string
RequireEmailVerified bool
AllowIDPInitiated bool
HTTPClient *http.Client
// EphemeralKey is set when SP key material was generated at startup (dev only).
EphemeralKey bool
}
Config describes a platform-wide SAML 2.0 IdP / SP pair.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements identity.FederationProvider for SAML 2.0.
func (*Provider) AuthURLWithID ¶
AuthURLWithID returns the IdP redirect URL and AuthnRequest ID.
func (*Provider) DisplayName ¶
func (*Provider) EphemeralKey ¶
EphemeralKey reports whether the SP signing key was generated at process start.
func (*Provider) Exchange ¶
func (p *Provider) Exchange(ctx context.Context, code, redirectURI string) (identity.FederatedClaims, error)
Exchange maps SAMLResponse (base64) into claims. Prefer ExchangeAssertion from ACS.
func (*Provider) ExchangeAssertion ¶
func (p *Provider) ExchangeAssertion(ctx context.Context, response, redirectURI string, possibleRequestIDs []string) (identity.FederatedClaims, error)
ExchangeAssertion validates a SAMLResponse and maps it to FederatedClaims.
func (*Provider) MetadataXML ¶
MetadataXML returns the SP EntityDescriptor.
Click to show internal directories.
Click to hide internal directories.