Documentation ¶
Index ¶
- Variables
- func CallDeviceAccessTokenEndpoint(ctx context.Context, request *DeviceAccessTokenRequest, ...) (*oidc.AccessTokenResponse, error)
- func CallDeviceAuthorizationEndpoint(request *oidc.ClientCredentialsRequest, caller DeviceAuthorizationCaller) (*oidc.DeviceAuthorizationResponse, error)
- func CallEndSessionEndpoint(request any, authFn any, caller EndSessionCaller) (*url.URL, error)
- func CallRevokeEndpoint(request any, authFn any, caller RevokeCaller) error
- func CallTokenEndpoint(request any, caller TokenEndpointCaller) (newToken *oauth2.Token, err error)
- func CallTokenExchangeEndpoint(request any, authFn any, caller TokenEndpointCaller) (resp *oidc.TokenExchangeResponse, err error)
- func ClientAssertionCodeOptions(assertion string) []oauth2.AuthCodeOption
- func ClientAssertionFormAuthorization(assertion string) http.FormAuthorization
- func ConfigFromKeyFile(path string) (*keyFile, error)
- func ConfigFromKeyFileData(data []byte) (*keyFile, error)
- func Discover(issuer string, httpClient *http.Client, wellKnownUrl ...string) (*oidc.DiscoveryConfiguration, error)
- func JWTProfileExchange(jwtProfileGrantRequest *oidc.JWTProfileGrantRequest, ...) (*oauth2.Token, error)
- func NewSignerFromPrivateKeyByte(key []byte, keyID string) (jose.Signer, error)
- func PollDeviceAccessTokenEndpoint(ctx context.Context, interval time.Duration, request *DeviceAccessTokenRequest, ...) (*oidc.AccessTokenResponse, error)
- func SignedJWTProfileAssertion(clientID string, audience []string, expiration time.Duration, ...) (string, error)
- type DeviceAccessTokenRequest
- type DeviceAuthorizationCaller
- type EndSessionCaller
- type RevokeCaller
- type RevokeRequest
- type TokenEndpointCaller
Constants ¶
This section is empty.
Variables ¶
View Source
var Encoder = httphelper.Encoder(oidc.NewEncoder())
Functions ¶
func CallDeviceAccessTokenEndpoint ¶
func CallDeviceAccessTokenEndpoint(ctx context.Context, request *DeviceAccessTokenRequest, caller TokenEndpointCaller) (*oidc.AccessTokenResponse, error)
func CallDeviceAuthorizationEndpoint ¶
func CallDeviceAuthorizationEndpoint(request *oidc.ClientCredentialsRequest, caller DeviceAuthorizationCaller) (*oidc.DeviceAuthorizationResponse, error)
func CallEndSessionEndpoint ¶
func CallRevokeEndpoint ¶
func CallRevokeEndpoint(request any, authFn any, caller RevokeCaller) error
func CallTokenEndpoint ¶
func CallTokenEndpoint(request any, caller TokenEndpointCaller) (newToken *oauth2.Token, err error)
func CallTokenExchangeEndpoint ¶
func CallTokenExchangeEndpoint(request any, authFn any, caller TokenEndpointCaller) (resp *oidc.TokenExchangeResponse, err error)
func ClientAssertionCodeOptions ¶
func ClientAssertionCodeOptions(assertion string) []oauth2.AuthCodeOption
func ClientAssertionFormAuthorization ¶
func ClientAssertionFormAuthorization(assertion string) http.FormAuthorization
func ConfigFromKeyFile ¶
func ConfigFromKeyFileData ¶
func Discover ¶
func Discover(issuer string, httpClient *http.Client, wellKnownUrl ...string) (*oidc.DiscoveryConfiguration, error)
Discover calls the discovery endpoint of the provided issuer and returns its configuration It accepts an optional argument "wellknownUrl" which can be used to overide the dicovery endpoint url
func JWTProfileExchange ¶
func JWTProfileExchange(jwtProfileGrantRequest *oidc.JWTProfileGrantRequest, caller TokenEndpointCaller) (*oauth2.Token, error)
JWTProfileExchange handles the oauth2 jwt profile exchange
func PollDeviceAccessTokenEndpoint ¶
func PollDeviceAccessTokenEndpoint(ctx context.Context, interval time.Duration, request *DeviceAccessTokenRequest, caller TokenEndpointCaller) (*oidc.AccessTokenResponse, error)
Types ¶
type DeviceAccessTokenRequest ¶
type DeviceAccessTokenRequest struct { *oidc.ClientCredentialsRequest oidc.DeviceAccessTokenRequest }
type EndSessionCaller ¶
type RevokeCaller ¶
type RevokeRequest ¶
type TokenEndpointCaller ¶
Click to show internal directories.
Click to hide internal directories.