pkg

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCodeFlowAttrs added in v0.10.0

type AuthCodeFlowAttrs struct {
	ClientType  string `json:"client_type"`
	RedirectURI string `json:"redirect_uri"`
}

AuthCodeFlowAttrs holds the additional attributes for AuthCodeFlowRequests

type AuthCodeFlowRequest

type AuthCodeFlowRequest struct {
	OIDCFlowRequest
	AuthCodeFlowAttrs
}

AuthCodeFlowRequest holds a authorization code flow request

func (AuthCodeFlowRequest) MarshalJSON

func (r AuthCodeFlowRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface

func (AuthCodeFlowRequest) Native

func (r AuthCodeFlowRequest) Native() bool

Native checks if the request is native

func (*AuthCodeFlowRequest) Scan added in v0.4.0

func (r *AuthCodeFlowRequest) Scan(src interface{}) error

Scan implements the sql.Scanner interface

func (*AuthCodeFlowRequest) UnmarshalJSON

func (r *AuthCodeFlowRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

func (AuthCodeFlowRequest) Value added in v0.4.0

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

Value implements the driver.Valuer interface

type CreateTransferCodeRequest added in v0.3.0

type CreateTransferCodeRequest struct {
	api.CreateTransferCodeRequest `json:",inline"`
	Mytoken                       universalmytoken.UniversalMytoken `json:"mytoken"`
}

CreateTransferCodeRequest is a request to create a new transfer code from an existing mytoken

type ExchangeTransferCodeRequest

type ExchangeTransferCodeRequest struct {
	api.ExchangeTransferCodeRequest `json:",inline"`
	GrantType                       model.GrantType `json:"grant_type"`
}

ExchangeTransferCodeRequest is a request to exchange a transfer code for the mytoken

func NewExchangeTransferCodeRequest added in v0.3.0

func NewExchangeTransferCodeRequest() ExchangeTransferCodeRequest

NewExchangeTransferCodeRequest returns a new ExchangeTransferCodeRequest

type MytokenFromMytokenRequest

type MytokenFromMytokenRequest struct {
	profiled.GeneralMytokenRequest `json:",inline"`
	Mytoken                        universalmytoken.UniversalMytoken `json:"mytoken"`
	FailOnRestrictionsNotTighter   bool                              `json:"error_on_restrictions,omitempty"`
}

MytokenFromMytokenRequest is a request to create a new Mytoken from an existing Mytoken It is analog to api.MytokenFromMytokenRequest

func NewMytokenRequest

func NewMytokenRequest() *MytokenFromMytokenRequest

NewMytokenRequest creates a MytokenFromMytokenRequest with the default values where they can be omitted

type MytokenResponse

type MytokenResponse struct {
	api.MytokenResponse `json:",inline"`
	MytokenType         model.ResponseType        `json:"mytoken_type"`
	Restrictions        restrictions.Restrictions `json:"restrictions,omitempty"`
	TokenUpdate         *MytokenResponse          `json:"token_update,omitempty"`
}

MytokenResponse is a response to a mytoken request

type OIDCFlowAttrs added in v0.10.0

type OIDCFlowAttrs struct {
	OIDCFlow model.OIDCFlow `json:"oidc_flow"`
}

OIDCFlowAttrs holds the additional attributes for OIDCFlowRequests

type OIDCFlowRequest

type OIDCFlowRequest struct {
	profiled.GeneralMytokenRequest
	OIDCFlowAttrs
}

OIDCFlowRequest holds the request for an OIDC Flow request

func NewOIDCFlowRequest

func NewOIDCFlowRequest() *OIDCFlowRequest

NewOIDCFlowRequest creates a new OIDCFlowRequest with default values where they can be omitted

func (OIDCFlowRequest) MarshalJSON

func (r OIDCFlowRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface

func (*OIDCFlowRequest) Scan

func (r *OIDCFlowRequest) Scan(src interface{}) error

Scan implements the sql.Scanner interface

func (*OIDCFlowRequest) UnmarshalJSON

func (r *OIDCFlowRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

func (OIDCFlowRequest) Value

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

Value implements the driver.Valuer interface

type OnlyTokenUpdateRes added in v0.10.0

type OnlyTokenUpdateRes struct {
	api.OnlyTokenUpdateResponse
	TokenUpdate *MytokenResponse `json:"token_update,omitempty"`
}

OnlyTokenUpdateRes is a response that contains only a TokenUpdate and is used when a rotating mytoken was used but no response is returned otherwise

func (*OnlyTokenUpdateRes) SetTokenUpdate added in v0.10.0

func (res *OnlyTokenUpdateRes) SetTokenUpdate(tokenUpdate *MytokenResponse)

SetTokenUpdate implements the pkg.TokenUpdatableResponse interface

type PollingCodeRequest

type PollingCodeRequest struct {
	api.PollingCodeRequest `json:",inline"`
	GrantType              model.GrantType `json:"grant_type"`
}

PollingCodeRequest is a polling code request

func NewPollingCodeRequest added in v0.3.0

func NewPollingCodeRequest() PollingCodeRequest

NewPollingCodeRequest returns a new PollingCodeRequest

type TokenUpdatableResponse added in v0.4.0

type TokenUpdatableResponse interface {
	SetTokenUpdate(response *MytokenResponse)
}

TokenUpdatableResponse is an interface for responses that can have a MytokenResponse as a token update (after token rotation)

type TransferCodeResponse

type TransferCodeResponse struct {
	api.TransferCodeResponse `json:",inline"`
	MytokenType              model.ResponseType `json:"mytoken_type"`
}

TransferCodeResponse is the response to a transfer code request

Jump to

Keyboard shortcuts

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