model

package
v0.0.0-...-efcb2a7 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationData

type AuthorizationData struct {
	ClientID            string                         `bson:"client_id"`
	RedirectURI         string                         `bson:"redirect_uri"`
	AuthorizationCode   string                         `bson:"authorization_code"`
	CodeChallenge       *string                        `bson:"code_challenge"`
	CodeChallengeMethod *constants.CodeChallengeMethod `bson:"code_challenge_method"`
}

func NewAuthorizationData

func NewAuthorizationData(clientID, redirectURI, authorizationCode string, opts ...AuthorizationDataOption) *AuthorizationData

type AuthorizationDataOption

type AuthorizationDataOption func(*AuthorizationData)

func WithCodeChallenge

func WithCodeChallenge(codeChallenge string) AuthorizationDataOption

func WithCodeChallengeMethod

func WithCodeChallengeMethod(codeChallengeMethod constants.CodeChallengeMethod) AuthorizationDataOption

type TokenData

type TokenData struct {
	ClientID     string    `bson:"client_id"`
	AccessToken  string    `bson:"access_token"`
	IssuedAt     time.Time `bson:"issued_at"`
	ExpiresIn    int       `bson:"expires_in"`
	RefreshToken string    `bson:"refresh_token"`
	TokenType    string    `bson:"token_type"`
}

Jump to

Keyboard shortcuts

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