transport

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ContextFlowOptionKey contextScopeKey = "authFlowOptions"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*RoundTripper)

func WithAuthFlow

func WithAuthFlow(flow flow.AuthFlow) Option

WithAuthFlow sets auth flow

func WithAuthorizationExchangeHeader added in v0.2.7

func WithAuthorizationExchangeHeader(name string) Option

func WithBackendForFrontendAuth added in v0.2.7

func WithBackendForFrontendAuth() Option

func WithGlobalResource

func WithGlobalResource(global *authorization.Authorization) Option

WithGlobalResource sets global resource

func WithStore

func WithStore(store store.Store) Option

WithStore sets store

type RoundTripper

type RoundTripper struct {
	Global *authorization.Authorization
	// contains filtered or unexported fields
}

func New

func New(options ...Option) (*RoundTripper, error)

func (*RoundTripper) IdToken

func (r *RoundTripper) IdToken(ctx context.Context, token *oauth2.Token, resourceMetadata *meta.ProtectedResourceMetadata) (*oauth2.Token, error)

func (*RoundTripper) ProtectedResourceToken

func (r *RoundTripper) ProtectedResourceToken(ctx context.Context, resourceMetadata *meta.ProtectedResourceMetadata, scope string) (*oauth2.Token, error)

func (*RoundTripper) RoundTrip

func (r *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

func (*RoundTripper) Store

func (r *RoundTripper) Store() store.Store

func (*RoundTripper) Token

func (r *RoundTripper) Token(ctx context.Context, resp *http.Response) (*oauth2.Token, error)

type Scopper

type Scopper interface {
	Scope(request *http.Request) string
}

Jump to

Keyboard shortcuts

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