tokencontext

package
v0.0.0-...-ef83997 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package tokencontext contains the code that extract token manager from the context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithSpaceAuthzService

func ContextWithSpaceAuthzService(ctx context.Context, s interface{}) context.Context

ContextWithSpaceAuthzService injects AuthzServiceManager in the context for every incoming request Accepts service.AuthzServiceManager in order to make sure that correct object is set in the context. Only other possible value is nil

func ContextWithTokenManager

func ContextWithTokenManager(ctx context.Context, tm interface{}) context.Context

ContextWithTokenManager injects tokenManager in the context for every incoming request Accepts Token.Manager in order to make sure that correct object is set in the context. Only other possible value is nil

func ReadSpaceAuthzServiceFromContext

func ReadSpaceAuthzServiceFromContext(ctx context.Context) interface{}

ReadSpaceAuthzServiceFromContext returns an interface that encapsulates the AuthzServiceManager extracted from context. This interface can be safely converted to space.AuthzServiceManager. Must have been set by ContextWithSpaceAuthzService ONLY.

func ReadTokenManagerFromContext

func ReadTokenManagerFromContext(ctx context.Context) interface{}

ReadTokenManagerFromContext returns an interface that encapsulates the tokenManager extracted from context. This interface can be safely converted. Must have been set by ContextWithTokenManager ONLY.

Types

This section is empty.

Jump to

Keyboard shortcuts

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