resourceserverlib

package
v0.0.0-...-69e9717 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CLIENT_CACHE_EXPIRES = 3600
View Source
const GRANT_TYPE_CLIENT_CREDENTIALS = "client_credentials"
View Source
const GRANT_TYPE_PASSWORD = "password"
View Source
const GRANT_TYPE_REFRESH_TOKEN = "refresh_token"

Variables

This section is empty.

Functions

func NewTokenService

func NewTokenService() *tokenService

Types

type OauthGrantIfc

type OauthGrantIfc interface {
	GetGrantType() string
	GetClientId() string
	GetUsername() string
	ToKey() string
}

func NewOauthGrant

func NewOauthGrant(grantType, clientId, username string) OauthGrantIfc

type TokenServiceIfc

type TokenServiceIfc interface {
	// Embedded Interface(s)
	dep.DependencyInjectableIfc

	// Our own interface
	AuthorizeGrantPassword(username, password, clientId string) (model.AccessTokenInfoIfc, error)
	AuthorizeGrantClientCredentials(clientId, clientSecret string) (model.AccessTokenInfoIfc, error)
	AuthorizeGrantRefresh(clientId, clientSecret, refreshToken string) (model.AccessTokenInfoIfc, error)
}

Jump to

Keyboard shortcuts

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