rs

package
v0.14.7 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Option

type Option func(*resourceServer)

func WithClient

func WithClient(client *http.Client) Option

WithClient provides the ability to set an http client to be used for the resource server

func WithStaticEndpoints

func WithStaticEndpoints(tokenURL, introspectURL string) Option

WithStaticEndpoints provides the ability to set static token and introspect URL

type ResourceServer

type ResourceServer interface {
	IntrospectionURL() string
	HttpClient() *http.Client
	AuthFn() (interface{}, error)
}

func NewResourceServerClientCredentials

func NewResourceServerClientCredentials(issuer, clientID, clientSecret string, option ...Option) (ResourceServer, error)

func NewResourceServerFromKeyFile

func NewResourceServerFromKeyFile(issuer, path string, options ...Option) (ResourceServer, error)

func NewResourceServerJWTProfile

func NewResourceServerJWTProfile(issuer, clientID, keyID string, key []byte, options ...Option) (ResourceServer, error)

Jump to

Keyboard shortcuts

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