tokenContext

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 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 HasRoles

func HasRoles(ctx context.Context, token string, roles []string) error

this is supposed to work only within a dsp environment.

# THIS DEPLOYMENT GETS A SUPPLY OF ENV VARS TO WORK WITH (WHEN it gets deployed by ai-provisioner / deployment server within DSP) # # Security stuff # - JWT_ISSUER the token ISSUER that will be used to validate all provided tokens # (i.e. https://auth.tiki-dsp.io/auth/realms/tiki) # # - OAUTH_CLIENT_ID the client that will be used to validate all provided tokens # (i.e. ai-examples-go-dev-web-go) # #

func JwtContext

func JwtContext() *auth.JwtContext

func SetIssuerUrl

func SetIssuerUrl(url string) error

Types

type ErrMissingRoles

type ErrMissingRoles struct {
	// contains filtered or unexported fields
}

func (*ErrMissingRoles) Error

func (e *ErrMissingRoles) Error() string

Jump to

Keyboard shortcuts

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