auth

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VetToken

func VetToken(ctx context.Context, t *Token) error

VetToken обновляет Token, если истёк его срок действия.

Types

type OutError added in v0.2.0

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

Output error object.

type Token

type Token struct {
	AccessToken     string `json:"access_token"`
	ExpiresIn       int    `json:"expires_in"`
	IdToken         string `json:"id_token"`
	NotBeforePolicy int    `json:"not-before-policy"`
	Scope           string `json:"scope"`
	TokenType       string `json:"token_type"`
	// contains filtered or unexported fields
}

Токен доступа, возвращаемый по запросу к /auth/system/openid/token.

func NewToken

func NewToken(ctx context.Context, id, secret string) (*Token, error)

NewToken возвращает новый Token.

Jump to

Keyboard shortcuts

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