oidcreqres

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OIDCErrorResponse

type OIDCErrorResponse struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description,omitempty"`

	Status int `json:"-"`
}

OIDCErrorResponse is the error response of an oidc provider

type OIDCTokenResponse

type OIDCTokenResponse struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int64  `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Scopes       string `json:"scope"`
	IDToken      string `json:"id_token"`
}

OIDCTokenResponse is the token response of an oidc provider

type RefreshRequest

type RefreshRequest struct {
	GrantType    string
	RefreshToken string
	Scopes       string
	Audiences    []string
	// contains filtered or unexported fields
}

RefreshRequest is the oidc request for a refresh flow

func NewRefreshRequest

func NewRefreshRequest(rt string, aud *model.AudienceConf) *RefreshRequest

NewRefreshRequest creates a new RefreshRequest for a given refresh token

func (*RefreshRequest) ToURLValues added in v0.10.0

func (r *RefreshRequest) ToURLValues() url.Values

ToURLValues formats the RefreshRequest as an url.Values

type RevokeRequest

type RevokeRequest struct {
	Token     string `json:"token"`
	TokenType string `json:"token_type_hint"`
}

RevokeRequest is an oidc request for revoking tokens

func NewRTRevokeRequest

func NewRTRevokeRequest(rt string) *RevokeRequest

NewRTRevokeRequest creates a new RevokeRequest for revoking the passed refresh token

func (*RevokeRequest) ToFormData

func (r *RevokeRequest) ToFormData() map[string]string

ToFormData formats the RevokeRequest as a string map

Jump to

Keyboard shortcuts

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