dto

package
v0.0.0-...-5c97e34 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Token       jwt.Token
	ID          string
	UserID      string
	ClientID    string
	SignedToken string
	ExpiresIn   int
}

type AuthorizeRequest

type AuthorizeRequest struct {
	ResponseType string `form:"response_type"`
	ClientID     string `form:"client_id"`
	RedirectURI  string `form:"redirect_uri"`
	Scope        string `form:"scope"`
	State        string `form:"state"`

	CodeChallengeMethod string `form:"code_challenge_method"`
	CodeChallenge       string `form:"code_challenge"`
}

type Client

type Client struct {
	ID                      string   `json:"id"`
	Secret                  string   `json:"secret"`
	Name                    string   `json:"name"`
	URL                     string   `json:"url"`
	LogoURI                 string   `json:"logo_uri"`
	Scope                   []string `json:"scope"`
	RedirectURIs            []string `json:"redirect_uris"`
	TokenEndpointAuthMethod string   `json:"token_endpoint_auth_method"`
	GrantTypes              []string `json:"grant_types"`
	ResponseTypes           []string `json:"response_types"`
}

type ClientRegister

type ClientRegister struct {
	ID                      string   `json:"id" binding:"required"`
	Secret                  string   `json:"secret" binding:"required"`
	Name                    string   `json:"name" binding:"required"`
	URL                     string   `json:"url"`
	LogoURI                 string   `json:"logo_uri"`
	Scope                   []string `json:"scope" binding:"required"`
	RedirectURIs            []string `json:"redirect_uris" binding:"required"`
	TokenEndpointAuthMethod string   `json:"token_endpoint_auth_method"`
	GrantTypes              []string `json:"grant_types"`
	ResponseTypes           []string `json:"response_types"`
}
type Consent struct {
	UserID   string
	ClientID string
}

type CreateAccessToken

type CreateAccessToken struct {
	ID           string
	UserID       string
	ClientID     string
	Scope        string
	EncryptedJWT string
	Expiration   time.Duration
}

type CreateAuthorizationCode

type CreateAuthorizationCode struct {
	ClientID            string
	UserID              string
	RedirectURI         string
	Scope               string
	CodeChallengeMethod string
	CodeChallenge       string
	Expiration          time.Duration
}

type CreateConsent

type CreateConsent struct {
	ClientID string `form:"client_id" binding:"required"`
	ReturnTo string `form:"return_to" binding:"required"`
}

type CreateRefreshToken

type CreateRefreshToken struct {
	UserID   string
	ClientID string
	Scope    string
}

type CreateTokens

type CreateTokens struct {
	UserID     string
	ClientID   string
	Scope      string
	Expiration time.Duration
}

type DeleteAccessTokens

type DeleteAccessTokens struct {
	UserID   string
	ClientID string
}

type GetAuthorizationCode

type GetAuthorizationCode struct {
	Code string
}

type LoginRequest

type LoginRequest struct {
	Username string `form:"username" binding:"required,max=60,alphanum"`
	Password string `form:"password" binding:"required,max=70"`
	ReturnTo string `form:"return_to" binding:"omitempty"`
}

type OAuthRegisterClient

type OAuthRegisterClient struct {
	JWKs                    jwk.Set `json:"jwks"`
	ClientURI               string  `json:"client_uri"`
	JwksURI                 string  `json:"jwks_uri"`
	LogoURI                 string  `json:"logo_uri"`
	TokenEndpointAuthMethod string  `json:"token_endpoint_auth_method"`
	Scope                   string  `json:"scope" binding:"required"`
	RegisterSecret          string
	ClientName              string `json:"client_name"`
	SoftwareVersion         string `json:"software_version"`
	SoftwareID              string `json:"software_id"`
	ClientSecret            string
	ClientID                string
	TosURI                  string   `json:"tos_uri"`
	PolicyURI               string   `json:"policy_uri"`
	ResponseTypes           []string `json:"response_types" binding:"required"`
	GrantTypes              []string `json:"grant_types" binding:"required"`
	RedirectURIs            []string `json:"redirect_uris" binding:"required"`
	Contacts                []string `json:"contacts"`
}

type OAuthRevoke

type OAuthRevoke struct {
	Token         string `form:"token" binding:"required"`
	TokenTypeHint string `form:"token_type_hint"`
}

type Profile

type Profile struct {
	Firstname string `json:"firstname"`
	Lastname  string `json:"lastname"`
	Email     string `json:"email"`
}

type RawRefreshToken

type RawRefreshToken struct {
	ID        string `json:"id"`
	UserID    string `json:"user_id"`
	ClientID  string `json:"client_id"`
	Scope     string `json:"scope"`
	CreatedAt int    `json:"created_at"`
}

type RefreshToken

type RefreshToken struct {
	SignedToken string
	ID          string
	UserID      string
	ClientID    string
	Scope       string
	CreatedAt   int
}

type RefreshTokens

type RefreshTokens struct {
	RefreshToken string
	ClientID     string
}

type RegisterRequest

type RegisterRequest struct {
	Username string `form:"username" binding:"required,max=60,alphanum"`
	Password string `form:"password" binding:"required,max=70"`
}

type RevokeAccessTokens

type RevokeAccessTokens struct {
	UserID   string
	ClientID string
}

type RevokeConsent

type RevokeConsent struct {
	ClientID string `form:"client_id" binding:"required"`
}

type RevokeRefreshTokens

type RevokeRefreshTokens struct {
	UserID   string
	ClientID string
}

type RevokeTokens

type RevokeTokens struct {
	Token    string
	ClientID string
}

type TokenRequest

type TokenRequest struct {
	GrantType    string `form:"grant_type"`
	Code         string `form:"code"`
	RefreshToken string `form:"refresh_token"`
	RedirectURI  string `form:"redirect_uri"`
	ClientID     string `form:"client_id"`
	ClientSecret string `form:"client_secret"`
	Scope        string `form:"scope"`
	CodeVerifier string `form:"code_verifier"`
}

type UpdateProfile

type UpdateProfile struct {
	Firstname string `form:"firstname" binding:"omitempty,max=60"`
	Lastname  string `form:"lastname" binding:"omitempty,max=60"`
	Email     string `form:"email" binding:"omitempty,max=100,email"`

	UserID string
}

type User

type User struct {
	ID        string `json:"id"`
	Username  string `json:"username"`
	Password  string
	Firstname string `json:"firstname"`
	Lastname  string `json:"lastname"`
	Email     string `json:"email"`
}

type UserConsents

type UserConsents struct {
	UserID    string
	ClientIDs []string
}

Jump to

Keyboard shortcuts

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