Documentation ¶
Index ¶
Constants ¶
const ( GrantTypeDeviceCode = GrantType(oidc.GrantTypeDeviceCode) GrantTypeClientCredentials = GrantType(oidc.GrantTypeClientCredentials) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶ added in v0.42.0
func (*Auth) UnmarshalJSON ¶ added in v0.42.0
type AuthResponse ¶ added in v0.42.0
type GrantType ¶ added in v0.44.0
GrantType is a subset of the OAuth 2.0 grant types. In our case, we will explicitly need them only in the /token endpoint, that we are using only in the context of device code flow and client credentials flow.
type Migrate ¶ added in v0.18.0
type Migrate struct { Input map[string]string `json:"input,omitempty"` GrafanaDashboard json.RawMessage `json:"grafanaDashboard"` }
func (*Migrate) UnmarshalJSON ¶ added in v0.18.0
type OAuthError ¶ added in v0.44.0
type OAuthError struct { ErrorCode string `json:"error"` ErrorDescription string `json:"error_description"` }
OAuthError represents the error response of a possible oauth endpoint. It is used to control the error type in the response of the backend request (client and server side) It helps for example when polling device access token to know if the device code is still valid, or if we need to slow down, etc ... Refs: https://www.rfc-editor.org/rfc/rfc8628#section-3.5 https://www.rfc-editor.org/rfc/rfc6749#section-5.2
func (*OAuthError) Error ¶ added in v0.44.0
func (e *OAuthError) Error() string
Error makes it an error, which can be convenient.
type RefreshRequest ¶ added in v0.42.0
type RefreshRequest struct {
RefreshToken string `json:"refreshToken"`
}
func (*RefreshRequest) UnmarshalJSON ¶ added in v0.42.0
func (r *RefreshRequest) UnmarshalJSON(data []byte) error
type TokenRequest ¶ added in v0.44.0
type TokenRequest struct { GrantType GrantType `json:"grant_type"` DeviceCode string `json:"device_code"` ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` }
TokenRequest represents the body of a /token endpoint request. DeviceCode or ClientID, ClientSecret will be necessary based on the grant type.
func (*TokenRequest) UnmarshalJSON ¶ added in v0.44.0
func (r *TokenRequest) UnmarshalJSON(data []byte) error