token

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_token_response_proto protoreflect.FileDescriptor
View Source
var File_proto_token_token_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Token

type Token struct {

	// sub - The subject the token was issued for. Can be a user id or a client ID
	Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty" bson:"sub"` // @gotags: bson:"sub"
	// client_id - The client ID of the application that issued the token
	ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" bson:"client_id"` // @gotags: bson:"client_id"
	// access_token - The access token that was issued
	AccessToken string `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty" bson:"access_token"` // @gotags: bson:"access_token"
	// refresh_token - The refresh token that was issued
	RefreshToken string `protobuf:"bytes,4,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty" bson:"refresh_token"` // @gotags: bson:"refresh_token"
	// id_token - The ID token that was issued
	IdToken string `protobuf:"bytes,5,opt,name=id_token,json=idToken,proto3" json:"id_token,omitempty" bson:"id_token"` // @gotags: bson:"id_token"
	// expires_in - The time in seconds that the token expires in
	ExpiresIn uint32 `protobuf:"varint,6,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty" bson:"expires_in"` // @gotags: bson:"expires_in"
	// expires_at - A timestamp that represents the datetime in which the access token expires
	ExpiresAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty" bson:"expires_at"` // @gotags: bson:"expires_at"
	// refresh_expires_at - A timestamp that represents the datetime in which the refresh token expires
	RefreshExpiresAt *timestamp.Timestamp `` // @gotags: bson:"refresh_expires_at"
	/* 137-byte string literal not displayed */
	// scope - Any permission scopes that were issued with the token
	Scope string `protobuf:"bytes,9,opt,name=scope,proto3" json:"scope,omitempty" bson:"scope"` // @gotags: bson:"scope"
	// contains filtered or unexported fields
}

Token - An internal representation of an issued token. This is generally not displayed to the user, but is instead used for tracking tokens internally in the database

func (*Token) Descriptor deprecated

func (*Token) Descriptor() ([]byte, []int)

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetAccessToken

func (x *Token) GetAccessToken() string

func (*Token) GetClientId

func (x *Token) GetClientId() string

func (*Token) GetExpiresAt

func (x *Token) GetExpiresAt() *timestamp.Timestamp

func (*Token) GetExpiresIn

func (x *Token) GetExpiresIn() uint32

func (*Token) GetIdToken

func (x *Token) GetIdToken() string

func (*Token) GetRefreshExpiresAt

func (x *Token) GetRefreshExpiresAt() *timestamp.Timestamp

func (*Token) GetRefreshToken

func (x *Token) GetRefreshToken() string

func (*Token) GetScope

func (x *Token) GetScope() string

func (*Token) GetSub

func (x *Token) GetSub() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

func (x *Token) ProtoReflect() protoreflect.Message

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type TokenResponse

type TokenResponse struct {

	// access_token - The JWT token as returned by the application
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty" bson:"access_token"` // @gotags: bson:"access_token"
	// id_token - The JWT token as returned by the application
	IdToken string `protobuf:"bytes,2,opt,name=id_token,json=idToken,proto3" json:"id_token,omitempty" bson:"id_token"` // @gotags: bson:"id_token"
	// token_type - The type of token this response represents. Usually bearer
	TokenType string `protobuf:"bytes,3,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty" bson:"token_type"` // @gotags: bson:"token_type"
	// expires_in - The time in seconds that the token expires in
	ExpiresIn uint32 `protobuf:"varint,4,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty" bson:"expires_in"` // @gotags: bson:"expires_in"
	// refresh_token - The refresh token that the application has issued
	RefreshToken string `protobuf:"bytes,5,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty" bson:"refresh_token"` // @gotags: bson:"refresh_token"
	// scope - A string of space seperated scopes that the user has been issued
	Scope string `protobuf:"bytes,6,opt,name=scope,proto3" json:"scope,omitempty" bson:"scope"` // @gotags: bson:"scope"
	// contains filtered or unexported fields
}

TokenResponse - Represents an HTTP response containing the credentials requested by the end user

func (*TokenResponse) Descriptor deprecated

func (*TokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use TokenResponse.ProtoReflect.Descriptor instead.

func (*TokenResponse) GetAccessToken

func (x *TokenResponse) GetAccessToken() string

func (*TokenResponse) GetExpiresIn

func (x *TokenResponse) GetExpiresIn() uint32

func (*TokenResponse) GetIdToken

func (x *TokenResponse) GetIdToken() string

func (*TokenResponse) GetRefreshToken

func (x *TokenResponse) GetRefreshToken() string

func (*TokenResponse) GetScope

func (x *TokenResponse) GetScope() string

func (*TokenResponse) GetTokenType

func (x *TokenResponse) GetTokenType() string

func (*TokenResponse) ProtoMessage

func (*TokenResponse) ProtoMessage()

func (*TokenResponse) ProtoReflect

func (x *TokenResponse) ProtoReflect() protoreflect.Message

func (*TokenResponse) Reset

func (x *TokenResponse) Reset()

func (*TokenResponse) String

func (x *TokenResponse) String() string

Jump to

Keyboard shortcuts

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