Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UsingTokenMode ¶
func UsingTokenMode() func(*PrivateKeyJWTAuthenticator)
UsingTokenMode sets tokenMode to true Token mode make the authenticator generating a bearer token for the client performing a concrete client_credentials flow, instead of just embedding private_key_jwt parameter in the body as it is necessary on an exchange token. The token is then used as a Bearer Token (Authorization Header), kept in memory with its expiry time and renewed when necessary.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implementing some Open ID Connect concepts as a Relying Party (a.k.a. Third Party).
func NewClient ¶
NewClient configured with a tokenURL and an encoded JWK: a base64 encoded string of the JSON Web Key (the public and private keypair) following https://tools.ietf.org/html/rfc7517 based on this string this constructor instantiates a JWK Signer to be able to sign client information in jwt.
type PrivateKeyJWTAuthenticator ¶
type PrivateKeyJWTAuthenticator struct {
// contains filtered or unexported fields
}
PrivateKeyJWTAuthenticator allows the Client Authentication using private_key_jwt method: https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication It has 2 possible mode described below.
func NewPrivateKeyJWTAuthenticator ¶
func NewPrivateKeyJWTAuthenticator(oidcCli *Client, options ...func(*PrivateKeyJWTAuthenticator)) *PrivateKeyJWTAuthenticator
NewPrivateKeyJWTAuthenticator returned, configured with the given OIDCClient
func (*PrivateKeyJWTAuthenticator) Set ¶
func (authenticator *PrivateKeyJWTAuthenticator) Set(ctx context.Context, req *http.Request)
Set client authentication considering used method is OIDC private_key_jwt: https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication