auth

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePermission

func CreatePermission(api, kind, verb string) string

CreatePermission creates a permission from given arguments.

func GetAccessToken

func GetAccessToken(ctx context.Context) (string, bool)

GetAccessToken fetches the access token from the given (GRPC) context. If no such token is found, false is returned.

func ParsePermission

func ParsePermission(p string) (string, string, string, error)

ParsePermission parses a permission into: - api - kind - verb

E.g. `iam.group.get` returns `iam`, `group`, `get`.

func WithAccessToken

func WithAccessToken(ctx context.Context, token string) context.Context

WithAccessToken returns a context that containes the given access token for outgoing (GRPC) calls and is derived from the given context.WithAccessToken

Types

This section is empty.

Jump to

Keyboard shortcuts

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