Documentation ¶
Index ¶
- Constants
- func ConvertTokenToRawIDToken(token *oauth2.Token) (string, error)
- func GenerateChallenge() (string, error)
- func IsAuthorizationPendingError(err error) bool
- func IsCannotDecodeToken(err error) bool
- func IsCannotGetDeviceCodeError(err error) bool
- func IsCannotGetDeviceTokenError(err error) bool
- func IsCannotParseJwtError(err error) bool
- func IsCannotRenewToken(err error) bool
- func IsInvalidChallenge(err error) bool
- func IsTooManyAuthRequestsError(err error) bool
- type Authenticator
- func (a *Authenticator) GetAuthSelectionURL(connectorType string) string
- func (a *Authenticator) GetAuthURL(connectorID string) string
- func (a *Authenticator) HandleIssuerResponse(ctx context.Context, challenge string, code string) (UserInfo, error)
- func (a *Authenticator) RenewToken(ctx context.Context, refreshToken string) (idToken string, rToken string, err error)
- type Claims
- type Config
- type DeviceAuthenticator
- type DeviceCodeResponseData
- type DeviceTokenResponseData
- type ErrorResponseData
- type JwtName
- type UserInfo
Constants ¶
View Source
const ( DeviceAuthKeyClientID = "client_id" DeviceAuthKeyScope = "scope" DeviceAuthKeyDeviceCode = "device_code" DeviceAuthKeyGrantType = "grant_type" ErrorTypeAuthPending = "authorization_pending" ErrorTypeSlowDown = "slow_down" DeviceAuthScopes = "openid profile email groups offline_access audience:server:client_id:dex-k8s-authenticator" DeviceAuthGrantType = "urn:ietf:params:oauth:grant-type:device_code" )
Variables ¶
This section is empty.
Functions ¶
func GenerateChallenge ¶
func IsAuthorizationPendingError ¶ added in v2.48.0
IsAuthorizationPendingError asserts authorizationPendingError.
func IsCannotDecodeToken ¶
IsCannotDecodeToken asserts cannotDecodeTokenError.
func IsCannotGetDeviceCodeError ¶ added in v2.48.0
IsCannotGetDeviceCodeError asserts cannotGetDeviceCodeError.
func IsCannotGetDeviceTokenError ¶ added in v2.48.0
IsCannotGetDeviceTokenError asserts cannotGetDeviceTokenError.
func IsCannotParseJwtError ¶ added in v2.48.0
IsCannotParseJwtError asserts cannotParseJwtError.
func IsCannotRenewToken ¶
IsCannotRenewToken asserts cannotRenewTokenError.
func IsInvalidChallenge ¶
IsInvalidChallenge asserts invalidChallengeError.
func IsTooManyAuthRequestsError ¶ added in v2.48.0
IsTooManyAuthRequestsError asserts tooManyAuthRequestsError.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func (*Authenticator) GetAuthSelectionURL ¶ added in v2.31.0
func (a *Authenticator) GetAuthSelectionURL(connectorType string) string
func (*Authenticator) GetAuthURL ¶
func (a *Authenticator) GetAuthURL(connectorID string) string
func (*Authenticator) HandleIssuerResponse ¶
func (*Authenticator) RenewToken ¶
type DeviceAuthenticator ¶ added in v2.48.0
type DeviceAuthenticator struct {
// contains filtered or unexported fields
}
func NewDeviceAuthenticator ¶ added in v2.48.0
func NewDeviceAuthenticator(clientID string, i *installation.Installation) *DeviceAuthenticator
func (*DeviceAuthenticator) LoadDeviceCode ¶ added in v2.48.0
func (a *DeviceAuthenticator) LoadDeviceCode() (DeviceCodeResponseData, error)
func (*DeviceAuthenticator) LoadDeviceToken ¶ added in v2.48.0
func (a *DeviceAuthenticator) LoadDeviceToken(data DeviceCodeResponseData) (DeviceTokenResponseData, string, error)
type DeviceCodeResponseData ¶ added in v2.48.0
type DeviceTokenResponseData ¶ added in v2.48.0
type ErrorResponseData ¶ added in v2.48.0
type ErrorResponseData struct {
Error string `json:"error"`
}
Click to show internal directories.
Click to hide internal directories.