authbouncer

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: MIT Imports: 8 Imported by: 0

README

auth-bouncer-go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGuard

func NewGuard(domain, clientID, secret string) *guard

NewGuard instantiates new guard struct

Types

type Guard

type Guard interface {
	Introspect(token string) (Introspect, error)
}

type Introspect added in v0.0.2

type Introspect struct {
	AccessToken string             `json:"access_token"`
	ClientID    string             `json:"client_id"`
	UserID      string             `json:"user_id"`
	Scopes      []string           `json:"scopes"`
	User        introspection.User `json:"user"`
}

type Mock added in v0.0.3

type Mock struct {
	AccessToken string
	ClientID    string
	UserID      string
	Scopes      []string
	User        introspection.User
}

func (Mock) Introspect added in v0.0.3

func (m Mock) Introspect(string) (Introspect, error)

Introspect mocks the bouncer's Introspect function

type Token

type Token struct {
	*cache.Cache
}

func NewToken

func NewToken() *Token

func (Token) GetCachedToken

func (t Token) GetCachedToken() string

GetCachedToken fetches client access token from cache

func (Token) SetCachedToken

func (t Token) SetCachedToken(token string)

SetCachedToken stores client access token to cache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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