auth

package
v0.8.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: 11 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 Token

type Token struct {
	// https://developers.sber.ru/docs/ru/gigachat/api/authorization#format-otveta25
	AccessToken string              `json:"access_token"`
	ExpiresAt   timehelper.UnixMsec `json:"expires_at"`
	// contains filtered or unexported fields
}

Токен доступа, возвращаемый по запросу к /api/v2/oauth.

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