auth

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2018 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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