authorizer

package
v1.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateServiceClaim added in v1.10.0

func GenerateServiceClaim(duration time.Duration) models.ServiceClaim

func HasRole

func HasRole(claims Claims, permission permissions.DatasetPermission) bool

HasRole returns a boolean indicating whether the user has the correct permissions.

func IsPublisher added in v1.6.0

func IsPublisher(claims *Claims) bool

IsPublisher returns a boolean indicating whether the user is on the Publishing team

Types

type Claims

type Claims struct {
	OrgClaim     organization.Claim
	DatasetClaim dataset.Claim
	UserClaim    user.Claim
	TeamClaims   []teamUser.Claim
}

Claims is an object containing claims and user info

func ParseClaims

func ParseClaims(claims map[string]interface{}) *Claims

ParseClaims creates a Claims object from a string map which is returned by the authorizer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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