usecases

package
v0.0.0-...-aa65b62 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAccessToken

func CheckAccessToken(accessToken string) error

CheckAccessToken checks if access token is valid

func LoginForAuthorizationCode

func LoginForAuthorizationCode(login, password string) (code string, err error)

LoginForAuthorizationCode Returns auth code for given credentials

func RefreshAccessToken

func RefreshAccessToken(refreshToken string) (accessToken string, err error)

RefreshAccessToken refreshes access token

func RegisterUser

func RegisterUser(login, password string) (err error)

RegisterUser registers new user

func RevokeRefreshToken

func RevokeRefreshToken(refreshToken string) (err error)

RevokeRefreshToken revokes refresh token and corresponding access token

func UseAuthorizationCode

func UseAuthorizationCode(code string) (
	accessToken string,
	validUntil time.Time,
	refreshToken string,
	refreshValidUntil time.Time,
	err error)

UseAuthorizationCode exchanges authorization code for access_token and refresh_token

Types

This section is empty.

Jump to

Keyboard shortcuts

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