Documentation ¶
Index ¶
- Constants
- type Config
- type Handler
- func (n *Handler) Authorize(ctx context.Context, token string, claims interface{}) error
- func (n *Handler) Exchange(ctx context.Context, code, state, redirectURL string) (*jwt.StandardClaims, error)
- func (n *Handler) GetAuthCodeURL(state *api.AuthState, scopes []string) (string, string, error)
- func (n *Handler) IssueToken(ctx context.Context, upstreamClaims *jwt.StandardClaims, userId string) (string, *jwt.AuthToken, error)
- func (n *Handler) KeyExpiration() time.Duration
- func (n *Handler) Keys() *jose.JSONWebKeySet
- func (n *Handler) SetupOIDC(ctx context.Context) error
- type OpenIdConfiguration
- type State
Constants ¶
View Source
const ( HeaderAuthId = "x-auth-id" HeaderAuthName = "x-auth-name" HeaderAuthEmail = "x-auth-email" HeaderAuthIssuer = "x-auth-issuer" HeaderForwardedClientCert = "x-forwarded-client-cert" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) Authorize ¶
Authorize parses the raw JWT, verifies the content against the public key of the verifier and parses the claims
func (*Handler) Exchange ¶
func (n *Handler) Exchange(ctx context.Context, code, state, redirectURL string) (*jwt.StandardClaims, error)
Exchange exchanges the auth code with a token of the upstream IDP and verifies the claims
func (*Handler) GetAuthCodeURL ¶
AuthCodeURL returns a URL to OAuth 2.0 provider's consent page that asks for permissions for the required scopes explicitly.
func (*Handler) IssueToken ¶
func (n *Handler) IssueToken(ctx context.Context, upstreamClaims *jwt.StandardClaims, userId string) (string, *jwt.AuthToken, error)
IssueToken wraps the upstream claims in a JWT signed by Monoskope
func (*Handler) KeyExpiration ¶
type OpenIdConfiguration ¶
Click to show internal directories.
Click to hide internal directories.