Documentation
¶
Index ¶
- func PdsDpopJwt(method, url, iss, accessToken, nonce string, privateJwk jwk.Key) (string, error)
- type Client
- func (c *Client) AuthServerDpopJwt(method, url, nonce string, privateJwk jwk.Key) (string, error)
- func (c *Client) ClientAssertionJwt(authServerUrl string) (string, error)
- func (c *Client) FetchAuthServerMetadata(ctx context.Context, ustr string) (*OauthAuthorizationMetadata, error)
- func (c *Client) InitialTokenRequest(ctx context.Context, ...) (*TokenResponse, error)
- func (c *Client) RefreshTokenRequest(ctx context.Context, refreshToken, authserverIss, dpopAuthserverNonce string, ...) (*TokenResponse, error)
- func (c *Client) ResolvePdsAuthServer(ctx context.Context, ustr string) (string, error)
- func (c *Client) SendParAuthRequest(ctx context.Context, authServerUrl string, ...) (*SendParAuthResponse, error)
- type ClientArgs
- type OauthAuthorizationMetadata
- type OauthProtectedResource
- type RefreshTokenArgs
- type SendParAuthResponse
- type TokenResponse
- type XrpcAuthedRequestArgs
- type XrpcClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(args ClientArgs) (*Client, error)
func (*Client) AuthServerDpopJwt ¶
func (*Client) ClientAssertionJwt ¶
func (*Client) FetchAuthServerMetadata ¶
func (*Client) InitialTokenRequest ¶
func (*Client) RefreshTokenRequest ¶
func (*Client) ResolvePdsAuthServer ¶
func (*Client) SendParAuthRequest ¶
func (c *Client) SendParAuthRequest(ctx context.Context, authServerUrl string, authServerMeta *OauthAuthorizationMetadata, loginHint, scope string, dpopPrivateKey jwk.Key) (*SendParAuthResponse, error)
type ClientArgs ¶
type OauthAuthorizationMetadata ¶
type OauthAuthorizationMetadata struct {
Issuer string `json:"issuer"`
RequestParameterSupported bool `json:"request_parameter_supported"`
RequestUriParameterSupported bool `json:"request_uri_parameter_supported"`
RequireRequestUriRegistration *bool `json:"require_request_uri_registration,omitempty"`
ScopesSupported []string `json:"scopes_supported"`
SubjectTypesSupported []string `json:"subject_types_supported"`
ResponseTypesSupported []string `json:"response_types_supported"`
ResponseModesSupported []string `json:"response_modes_supported"`
GrantTypesSupported []string `json:"grant_types_supported"`
CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported"`
UILocalesSupported []string `json:"ui_locales_supported"`
DisplayValuesSupported []string `json:"display_values_supported"`
RequestObjectSigningAlgValuesSupported []string `json:"request_object_signing_alg_values_supported"`
AuthorizationResponseISSParameterSupported bool `json:"authorization_response_iss_parameter_supported"`
RequestObjectEncryptionAlgValuesSupported []string `json:"request_object_encryption_alg_values_supported"`
RequestObjectEncryptionEncValuesSupported []string `json:"request_object_encryption_enc_values_supported"`
JwksUri string `json:"jwks_uri"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
TokenEndpoint string `json:"token_endpoint"`
TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"`
TokenEndpointAuthSigningAlgValuesSupported []string `json:"token_endpoint_auth_signing_alg_values_supported"`
RevocationEndpoint string `json:"revocation_endpoint"`
IntrospectionEndpoint string `json:"introspection_endpoint"`
PushedAuthorizationRequestEndpoint string `json:"pushed_authorization_request_endpoint"`
RequirePushedAuthorizationRequests bool `json:"require_pushed_authorization_requests"`
DpopSigningAlgValuesSupported []string `json:"dpop_signing_alg_values_supported"`
ProtectedResources []string `json:"protected_resources"`
ClientIDMetadataDocumentSupported bool `json:"client_id_metadata_document_supported"`
}
func (*OauthAuthorizationMetadata) UnmarshalJSON ¶
func (oam *OauthAuthorizationMetadata) UnmarshalJSON(b []byte) error
type OauthProtectedResource ¶
type OauthProtectedResource struct {
Resource string `json:"resource"`
AuthorizationServers []string `json:"authorization_servers"`
ScopesSupported []string `json:"scopes_supported"`
BearerMethodsSupported []string `json:"bearer_methods_supported"`
ResourceDocumentation string `json:"resource_documentation"`
}
func (*OauthProtectedResource) UnmarshalJSON ¶
func (opr *OauthProtectedResource) UnmarshalJSON(b []byte) error
type RefreshTokenArgs ¶
type SendParAuthResponse ¶
type TokenResponse ¶
type XrpcAuthedRequestArgs ¶
type XrpcClient ¶
type XrpcClient struct {
// Client is an HTTP client to use. If not set, defaults to http.RobustHTTPClient().
Client *http.Client
UserAgent *string
Headers map[string]string
OnDpopPdsNonceChanged func(did, newNonce string)
}
func (*XrpcClient) Do ¶
func (c *XrpcClient) Do(ctx context.Context, authedArgs *XrpcAuthedRequestArgs, kind xrpc.XRPCRequestType, inpenc, method string, params map[string]any, bodyobj any, out any) error
Click to show internal directories.
Click to hide internal directories.