oauth

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProviderClient

func NewProviderClient(client *http.Client) appoauth.ProviderClient

func NewUpstreamRegistrar

func NewUpstreamRegistrar(clients appoauth.ClientStore, client *http.Client) appoauth.UpstreamRegistrar

Types

type ConnectStore

type ConnectStore struct {
	// contains filtered or unexported fields
}

func NewConnectStore

func NewConnectStore(rdb *redis.Client) *ConnectStore

func (*ConnectStore) GetClient

func (s *ConnectStore) GetClient(ctx context.Context, key string) (*appoauth.RegisteredClient, error)

func (*ConnectStore) GetTicket

func (s *ConnectStore) GetTicket(ctx context.Context, id string) (*appoauth.ConnectTicket, error)

func (*ConnectStore) SaveClient

func (s *ConnectStore) SaveClient(ctx context.Context, key string, c appoauth.RegisteredClient) error

func (*ConnectStore) SaveConnect

func (s *ConnectStore) SaveConnect(ctx context.Context, state string, c appoauth.ConnectState) error

func (*ConnectStore) SaveTicket

func (s *ConnectStore) SaveTicket(ctx context.Context, id string, t appoauth.ConnectTicket) error

func (*ConnectStore) TakeConnect

func (s *ConnectStore) TakeConnect(ctx context.Context, state string) (*appoauth.ConnectState, error)

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(rdb *redis.Client) *Store

func (*Store) GetGatewayClient

func (s *Store) GetGatewayClient(ctx context.Context, clientID string) (*appoauth.RegisteredGatewayClient, error)

func (*Store) SaveCode

func (s *Store) SaveCode(ctx context.Context, code string, g appoauth.CodeGrant) error

func (*Store) SaveGatewayClient

func (s *Store) SaveGatewayClient(ctx context.Context, c appoauth.RegisteredGatewayClient) error

func (*Store) SavePending

func (s *Store) SavePending(ctx context.Context, state string, p appoauth.PendingAuthorization) error

func (*Store) TakeCode

func (s *Store) TakeCode(ctx context.Context, code string) (*appoauth.CodeGrant, error)

func (*Store) TakePending

func (s *Store) TakePending(ctx context.Context, state string) (*appoauth.PendingAuthorization, error)

Jump to

Keyboard shortcuts

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