Documentation ¶
Index ¶
- Variables
- func BadRequestError(errorDescription string) api.Error
- func ErrorWithErrorDescription(e string, err error) api.Error
- func ErrorWithoutDescription(err string) api.Error
- func InternalServerError(errorDescription string) api.Error
- func InvalidTokenError(errorDescription string) api.Error
- func OIDCError(oidcError, oidcErrorDescription string) api.Error
- func OIDCErrorFromBody(body []byte) (apiError api.Error, ok bool)
- func OIDCFlowIsInSlice(f OIDCFlow, s []OIDCFlow) bool
- type GrantType
- func (g GrantType) AddToSliceIfNotFound(s *[]GrantType)
- func (g GrantType) MarshalJSON() ([]byte, error)
- func (g *GrantType) String() string
- func (g *GrantType) UnmarshalJSON(data []byte) error
- func (g *GrantType) UnmarshalText(data []byte) error
- func (g *GrantType) UnmarshalYAML(value *yaml.Node) error
- func (g *GrantType) Valid() bool
- 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 ¶
func BadRequestError(errorDescription string) api.Error
BadRequestError creates an Error for bad request errors
func ErrorWithErrorDescription ¶
ErrorWithErrorDescription creates an Error from an error string and golang error
func ErrorWithoutDescription ¶
func ErrorWithoutDescription(err string) api.Error
ErrorWithoutDescription creates an Error from an error string
func InternalServerError ¶
func InternalServerError(errorDescription string) api.Error
InternalServerError creates an Error for internal server errors
func InvalidTokenError ¶
func InvalidTokenError(errorDescription string) api.Error
InvalidTokenError creates an Error for invalid token errors
func OIDCError ¶
func OIDCError(oidcError, oidcErrorDescription string) api.Error
OIDCError creates an Error for oidc related errors
func OIDCErrorFromBody ¶
OIDCErrorFromBody creates an Error 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 GrantTypeTransferCode GrantTypeSSH )
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) UnmarshalText ¶ added in v0.3.0
UnmarshalText implements the encoding.TextUnmarshaler 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