oauth

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 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) SaveSession added in v0.2.3

func (s *Store) SaveSession(ctx context.Context, refreshToken string, rec appoauth.SessionRecord) 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)

func (*Store) TakeSession added in v0.2.3

func (s *Store) TakeSession(ctx context.Context, refreshToken string) (*appoauth.SessionRecord, error)

type UserInfoClient added in v0.2.3

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

func NewUserInfoClient added in v0.2.3

func NewUserInfoClient(client *http.Client) *UserInfoClient

func (*UserInfoClient) Fetch added in v0.2.3

func (c *UserInfoClient) Fetch(ctx context.Context, userInfoURL, accessToken string) (map[string]any, error)

Jump to

Keyboard shortcuts

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