scope

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatScope

func FormatScope(scopeType string, scope *authpb.Scope) (string, error)

FormatScope create a pretty print of the scope

func GetOwnerScope added in v1.8.0

func GetOwnerScope() (map[string]*authpb.Scope, error)

GetOwnerScope returns the default owner scope with access to all resources.

func GetPublicShareScope added in v1.8.0

func GetPublicShareScope(share *link.PublicShare, role authpb.Role) (map[string]*authpb.Scope, error)

GetPublicShareScope returns the scope to allow access to a public share and the shared resource.

func GetResourceInfoScope added in v1.8.0

func GetResourceInfoScope(r *provider.ResourceInfo, role authpb.Role) (map[string]*authpb.Scope, error)

GetResourceInfoScope returns the scope to allow access to a resource info object.

func VerifyScope

func VerifyScope(scopeMap map[string]*authpb.Scope, resource interface{}) (bool, error)

VerifyScope is the function to be called when dismantling tokens to check if the token has access to a particular resource.

Types

type Verifier

type Verifier func(*authpb.Scope, interface{}) (bool, error)

Verifier is the function signature which every scope verifier should implement.

Jump to

Keyboard shortcuts

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