auth

package
v0.0.0-...-0c1943d Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(username string) (accessToken string, err error)

GenerateToken generates an access token for the REST API

func Init

func Init() (err error)

Init prepares a private key to sign access tokens, and sets token duration

func ValidateCredentials

func ValidateCredentials(username, password string, config *config.Config) bool

ValidateCredentials checks whether the provided username and password are valid

func ValidateToken

func ValidateToken(accessToken string, resourceScopes []string, conf *config.Config) (
	valid bool, err error)

ValidateToken verifies the signature and validates the access token

Types

This section is empty.

Jump to

Keyboard shortcuts

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