model

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllGrantTypes = api.AllGrantTypes

AllGrantTypes holds all defined GrantType strings

View Source
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

func ErrorWithErrorDescription(e string, err error) api.Error

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

func OIDCErrorFromBody(body []byte) (apiError api.Error, ok bool)

OIDCErrorFromBody creates an Error for oidc related errors from the response of an oidc provider

func OIDCFlowIsInSlice

func OIDCFlowIsInSlice(f OIDCFlow, s []OIDCFlow) bool

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

func NewGrantType(s string) GrantType

NewGrantType creates a new GrantType from the grant type string

func (GrantType) AddToSliceIfNotFound

func (g GrantType) AddToSliceIfNotFound(s *[]GrantType)

AddToSliceIfNotFound adds the GrantType to a slice s if it is not already there

func (GrantType) MarshalJSON

func (g GrantType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface

func (*GrantType) String

func (g *GrantType) String() string

func (*GrantType) UnmarshalJSON

func (g *GrantType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

func (*GrantType) UnmarshalText added in v0.3.0

func (g *GrantType) UnmarshalText(data []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface

func (*GrantType) UnmarshalYAML

func (g *GrantType) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the yaml.Unmarshaler interface

func (*GrantType) Valid

func (g *GrantType) Valid() bool

Valid checks that GrantType is a defined grant type

type OIDCFlow

type OIDCFlow int

OIDCFlow is a enum like type for oidc flows

const (
	OIDCFlowAuthorizationCode OIDCFlow = iota
)

OIDCFlows

func NewOIDCFlow

func NewOIDCFlow(s string) OIDCFlow

NewOIDCFlow creates a new OIDCFlow from the flow string

func (OIDCFlow) AddToSliceIfNotFound

func (f OIDCFlow) AddToSliceIfNotFound(s *[]OIDCFlow)

AddToSliceIfNotFound adds the OIDCFlow to a slice s if it is not already there

func (OIDCFlow) MarshalJSON

func (f OIDCFlow) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface

func (*OIDCFlow) String

func (f *OIDCFlow) String() string

func (*OIDCFlow) UnmarshalJSON

func (f *OIDCFlow) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

func (*OIDCFlow) UnmarshalYAML

func (f *OIDCFlow) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements the yaml.Unmarshaler interface

func (*OIDCFlow) Valid

func (f *OIDCFlow) Valid() bool

Valid checks that OIDCFlow is a defined flow

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

func (ResponseType) Value

func (r ResponseType) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL