auth

package
v0.81.9 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 6 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 GetApiKeyAndSecret added in v0.77.4

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

GetApiKeyAndSecret fetches the api key & secret from the given (GRPC) context. If key & secret are not 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