auth

package
v0.0.0-...-deb7403 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasRole

func HasRole(token string, scopes []string) (*models.Principal, error)

HasRole tells if the Bearer token is a JWT signed by us with a claim to be member of an authorization scope. We verify that the claimed role is one of the passed scopes

func IsRegistered

func IsRegistered(user, pass string) (*models.Principal, error)

IsRegistered determines if the user is properly registered, i.e if a valid username:password pair has been provided

func IsReseller

func IsReseller(token string) (*models.Principal, error)

IsReseller tells if the API key is a JWT signed by us with a claim to be a reseller

Types

This section is empty.

Jump to

Keyboard shortcuts

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