auth

package
Version: v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 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.

Source Files

Jump to

Keyboard shortcuts

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