Documentation
¶
Index ¶
- Variables
- func BadRequestError(errorDescription string) api.APIError
- func ErrorWithErrorDescription(e string, err error) api.APIError
- func ErrorWithoutDescription(err string) api.APIError
- func InternalServerError(errorDescription string) api.APIError
- func InvalidTokenError(errorDescription string) api.APIError
- func OIDCError(oidcError, oidcErrorDescription string) api.APIError
- func OIDCErrorFromBody(body []byte) (apiError api.APIError, ok bool)
- func OIDCFlowIsInSlice(f OIDCFlow, s []OIDCFlow) bool
- type GrantType
- type OIDCFlow
- type ResponseType
- func (r ResponseType) AddToSliceIfNotFound(s *[]ResponseType)
- func (r ResponseType) MarshalJSON() ([]byte, error)
- func (r *ResponseType) Scan(src interface{}) error
- func (r *ResponseType) String() string
- func (r *ResponseType) UnmarshalJSON(data []byte) error
- func (r *ResponseType) UnmarshalYAML(value *yaml.Node) error
- func (r *ResponseType) Valid() bool
- func (r ResponseType) Value() (driver.Value, error)
- type TokeninfoAction
- func (a TokeninfoAction) AddToSliceIfNotFound(s *[]TokeninfoAction)
- func (a TokeninfoAction) MarshalJSON() ([]byte, error)
- func (a *TokeninfoAction) String() string
- func (a *TokeninfoAction) UnmarshalJSON(data []byte) error
- func (a *TokeninfoAction) UnmarshalYAML(value *yaml.Node) error
- func (a *TokeninfoAction) Valid() bool
Constants ¶
This section is empty.
Variables ¶
var AllGrantTypes = api.AllGrantTypes
AllGrantTypes holds all defined GrantType strings
var AllTokeninfoActions = api.AllTokeninfoActions
AllTokeninfoActions holds all defined TokenInfo strings
Functions ¶
func BadRequestError ¶
BadRequestError creates an APIError for bad request errors
func ErrorWithErrorDescription ¶
ErrorWithErrorDescription creates an APIError from an error string and golang error
func ErrorWithoutDescription ¶
ErrorWithoutDescription creates an APIError from an error string
func InternalServerError ¶
InternalServerError creates an APIError for internal server errors
func InvalidTokenError ¶
InvalidTokenError creates an APIError for invalid token errors
func OIDCErrorFromBody ¶
OIDCErrorFromBody creates an APIError for oidc related errors from the response of an oidc provider
func OIDCFlowIsInSlice ¶
OIDCFlowIsInSlice checks if a OIDCFlow is present in a slice of OIDCFlows
Types ¶
type GrantType ¶
type GrantType int
GrantType is an enum like type for grant types
const ( GrantTypeMytoken GrantType = iota GrantTypeOIDCFlow GrantTypePollingCode GrantTypeAccessToken GrantTypePrivateKeyJWT GrantTypeTransferCode )
GrantTypes
func NewGrantType ¶
NewGrantType creates a new GrantType from the grant type string
func (GrantType) AddToSliceIfNotFound ¶
AddToSliceIfNotFound adds the GrantType to a slice s if it is not already there
func (GrantType) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface
func (*GrantType) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface
func (*GrantType) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface
type OIDCFlow ¶
type OIDCFlow int
OIDCFlow is a enum like type for oidc flows
func NewOIDCFlow ¶
NewOIDCFlow creates a new OIDCFlow from the flow string
func (OIDCFlow) AddToSliceIfNotFound ¶
AddToSliceIfNotFound adds the OIDCFlow to a slice s if it is not already there
func (OIDCFlow) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface
func (*OIDCFlow) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface
func (*OIDCFlow) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface
type ResponseType ¶
type ResponseType int
ResponseType is a enum like type for response types
const ( ResponseTypeToken ResponseType = iota ResponseTypeShortToken ResponseTypeTransferCode )
ResponseTypes
func NewResponseType ¶
func NewResponseType(s string) ResponseType
NewResponseType creates a new ResponseType from the given response type string
func (ResponseType) AddToSliceIfNotFound ¶
func (r ResponseType) AddToSliceIfNotFound(s *[]ResponseType)
AddToSliceIfNotFound adds the ResponseType to a slice s if it is not already there
func (ResponseType) MarshalJSON ¶
func (r ResponseType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface
func (*ResponseType) Scan ¶
func (r *ResponseType) Scan(src interface{}) error
Scan implements the sql.Scanner interface.
func (*ResponseType) String ¶
func (r *ResponseType) String() string
func (*ResponseType) UnmarshalJSON ¶
func (r *ResponseType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
func (*ResponseType) UnmarshalYAML ¶
func (r *ResponseType) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface
func (*ResponseType) Valid ¶
func (r *ResponseType) Valid() bool
Valid checks that ResponseType is a defined flow
type TokeninfoAction ¶
type TokeninfoAction int
TokeninfoAction is an enum like type for tokeninfo actions
const ( TokeninfoActionIntrospect TokeninfoAction = iota TokeninfoActionEventHistory TokeninfoActionSubtokenTree TokeninfoActionListMytokens )
TokeninfoActions
func NewTokeninfoAction ¶
func NewTokeninfoAction(s string) TokeninfoAction
NewTokeninfoAction creates a new TokeninfoAction from the tokeninfo action string
func (TokeninfoAction) AddToSliceIfNotFound ¶
func (a TokeninfoAction) AddToSliceIfNotFound(s *[]TokeninfoAction)
AddToSliceIfNotFound adds the TokeninfoAction to a slice s if it is not already there
func (TokeninfoAction) MarshalJSON ¶
func (a TokeninfoAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface
func (*TokeninfoAction) String ¶
func (a *TokeninfoAction) String() string
func (*TokeninfoAction) UnmarshalJSON ¶
func (a *TokeninfoAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
func (*TokeninfoAction) UnmarshalYAML ¶
func (a *TokeninfoAction) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface
func (*TokeninfoAction) Valid ¶
func (a *TokeninfoAction) Valid() bool
Valid checks that TokeninfoAction is a defined tokeninfo action