interfaces

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrApiKeyNotFound = errors.New("api key was not found")

Functions

This section is empty.

Types

type ApiKeyContextAdapter

type ApiKeyContextAdapter interface {
	Get(key string) (*models.ApiKey, error)
	Delete(key string) error
	Add(key *models.ApiKey) error
	Validate(key string, value string) (bool, error)
}

type AuthorizationFlow

type AuthorizationFlow interface {
	Authorize(request *models.OAuthLoginRequest, tenant string) (*models.OAuthLoginResponse, *models.OAuthErrorResponse)
	RefreshToken(request *models.OAuthLoginRequest, tenant string) (*models.OAuthLoginResponse, *models.OAuthErrorResponse)
	ValidateEmailToken(request *models.OAuthLoginRequest, tenant string) (*models.OAuthLoginResponse, *models.OAuthErrorResponse)
}

type KeyVault

type KeyVault interface {
	Get()
}

type UserContextAdapter

type UserContextAdapter interface {
	GetUserById(id string) *models.User
	GetUserByEmail(email string) *models.User
	GetUserByUsername(username string) *models.User
	UpsertUser(user models.User) error
	RemoveUser(id string) bool
	GetUserRefreshToken(id string) *string
	UpdateUserRefreshToken(id string, token string) bool
	GetUserEmailVerifyToken(id string) *string
	UpdateUserEmailVerifyToken(id string, token string) bool
}

Jump to

Keyboard shortcuts

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