Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OIDC ¶
func OIDC(cfg Issuer) auth.HandlerFunc
OIDC returns a HandlerFunc who authenticates a user with the provided issuer using an access_token attached to the request. If provided, this access_token is exchanged for the authenticated user's information. It's important to know that this function does not handle authorization and requires an additional HandleFunc to do so.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
Issuer Issuer `json:"issuer"`
}
ClientConfig encapsulates the information needed to establish a client connection to an identity provider.
type Config ¶
type Config struct { Issuer Issuer `json:"issuer"` ClientID string `json:"client_id" usage:"the client_id associated with this service"` ClientSecret string `json:"client_secret" usage:"the client_secret associated with this service"` RedirectURL string `json:"redirect_url" usage:"the redirect_url used by this service to obtain a token"` Scopes *cli.StringSlice `json:"scopes" usage:"specify the scopes that this authorization requires" default:"openid,profile,email"` }
Config defines the information needed for an application to obtain an identity token from a provider.
type Issuer ¶
type Issuer struct { ServerURL string `json:"server_url" usage:"the address of the server where user authentication is performed"` CertificateAuthority string `json:"certificate_authority" usage:"path pointing to a file containing the certificate authority data for the server"` }
Issuer defines data needed to establish a connection to an issuer.
type TokenCallback ¶
TokenCallback is invoked by the OIDCServeMux endpoint when we've successfully received and validated the authenticated user session.