Documentation
¶
Index ¶
- func NewDeviceCodeFlow(prompter Prompter) func(c *Client) (Initiator, error)
- func NewLegacyDeviceCodeFlow(prompter Prompter) func(c *Client) (Initiator, error)
- type Client
- type ClientOptionFunc
- func WithConfigurationFromWellknown(url string, placeholders map[string]string) ClientOptionFunc
- func WithConfigurationOverrides(config OpenIDConfiguration) ClientOptionFunc
- func WithFlow(flow InitiatorFactory) ClientOptionFunc
- func WithNowGetter(nowGetter func() time.Time) ClientOptionFunc
- func WithResource(resource string) ClientOptionFunc
- func WithTokenStore(store TokenStore) ClientOptionFunc
- type DeviceCodeFlowInitiator
- type DurationInSeconds
- type ErrTokenExpired
- type ErrTokenStoreContentBroken
- type ErrorResponse
- type Initiator
- type InitiatorFactory
- type OpenIDConfiguration
- type Prompter
- type SimpleTokenStore
- type TokenEndpointResponse
- type TokenStore
- type Tokens
- type TokensSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeviceCodeFlow ¶
Types ¶
type Client ¶
type Client struct { Configuration OpenIDConfiguration Tx *http.Transport ClientId string Resource string Scope string TokenStore TokenStore Flow InitiatorFactory // contains filtered or unexported fields }
func (*Client) FetchTokens ¶
type ClientOptionFunc ¶
func WithConfigurationFromWellknown ¶
func WithConfigurationFromWellknown(url string, placeholders map[string]string) ClientOptionFunc
func WithConfigurationOverrides ¶
func WithConfigurationOverrides(config OpenIDConfiguration) ClientOptionFunc
func WithFlow ¶
func WithFlow(flow InitiatorFactory) ClientOptionFunc
func WithNowGetter ¶
func WithNowGetter(nowGetter func() time.Time) ClientOptionFunc
func WithResource ¶
func WithResource(resource string) ClientOptionFunc
func WithTokenStore ¶
func WithTokenStore(store TokenStore) ClientOptionFunc
type DeviceCodeFlowInitiator ¶
type DeviceCodeFlowInitiator struct {
// contains filtered or unexported fields
}
func (*DeviceCodeFlowInitiator) DisplayName ¶
func (*DeviceCodeFlowInitiator) DisplayName() string
type DurationInSeconds ¶
func (*DurationInSeconds) UnmarshalJSON ¶
func (i *DurationInSeconds) UnmarshalJSON(b []byte) error
type ErrTokenExpired ¶
type ErrTokenExpired struct {
// contains filtered or unexported fields
}
func (*ErrTokenExpired) Error ¶
func (e *ErrTokenExpired) Error() string
type ErrTokenStoreContentBroken ¶
type ErrTokenStoreContentBroken struct{}
func (*ErrTokenStoreContentBroken) Error ¶
func (*ErrTokenStoreContentBroken) Error() string
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type InitiatorFactory ¶
type OpenIDConfiguration ¶
type OpenIDConfiguration struct { AuthorizationEndpoint string `json:"authorization_endpoint"` ClaimsSupported []string `json:"claims_supported,omitempty"` CloudGraphHostName string `json:"cloud_graph_host_name,omitempty"` CloudInstanceName string `json:"cloud_instance_name,omitempty"` DeviceAuthorizationEndpoint string `json:"device_authorization_endpoint,omitempty"` EndSessionEndpoint string `json:"end_session_endpoint,omitempty"` FrontchannelLogoutSupported bool `json:"frontchannel_logout_supported,omitempty"` HttpLogoutSupported bool `json:"http_logout_supported,omitempty"` IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` Issuer string `json:"issuer,omitempty"` JwksUri string `json:"jwks_uri,omitempty"` KerberosEndpoint string `json:"kerberos_endpoint,omitempty"` MsgraphHost string `json:"msgraph_host,omitempty"` RbacUrl string `json:"rbac_url,omitempty"` RequestUriParameterSupported bool `json:"request_uri_parameter_supported,omitempty"` ResponseModesSupported []string `json:"response_modes_supported,omitempty"` ResponseTypesSupported []string `json:"response_types_supported,omitempty"` ScopesSupported []string `json:"scopes_supported,omitempty"` SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` TenantRegionScope string `json:"tenant_region_scope,omitempty"` TokenEndpoint string `json:"token_endpoint,omitempty"` TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported,omitempty"` UserinfoEndpoint string `json:"userinfo_endpoint,omitempty"` }
type SimpleTokenStore ¶
type SimpleTokenStore struct {
// contains filtered or unexported fields
}
func NewSimpleTokenStore ¶
func NewSimpleTokenStore(path string, authority string, nowGetter func() time.Time) *SimpleTokenStore
type TokenEndpointResponse ¶
type TokenEndpointResponse struct { TokenType string `json:"token_type"` AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token,omitempty"` IdToken string `json:"id_token,omitempty"` Scope string `json:"scope,omitempty"` ExpiresIn DurationInSeconds `json:"expires_in,omitempty"` }
type TokenStore ¶
type Tokens ¶
type Tokens struct { TokenType string `json:"tokenType"` AccessToken string `json:"accessToken"` RefreshToken string `json:"refreshToken,omitempty"` IdToken string `json:"idToken,omitempty"` Scope string `json:"scope,omitempty"` Resource string `json:"resource,omitempty"` ExpireOn time.Time `json:"expireOn,omitempty"` Authority string `json:"_authority"` }
Click to show internal directories.
Click to hide internal directories.