session

package
v1.9.1-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuthRequest

type OAuthRequest struct {
	AuthserverIss       string
	Handle              string
	State               string
	Did                 string
	PdsUrl              string
	PkceVerifier        string
	DpopAuthserverNonce string
	DpopPrivateJwk      string
	ReturnUrl           string
}

type OAuthSession

type OAuthSession struct {
	Handle              string
	Did                 string
	PdsUrl              string
	AccessJwt           string
	RefreshJwt          string
	AuthServerIss       string
	DpopPdsNonce        string
	DpopAuthserverNonce string
	DpopPrivateJwk      string
	Expiry              string
}

type SessionStore

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

func New

func New(cache *cache.Cache) *SessionStore

func (*SessionStore) DeleteRequestByState

func (s *SessionStore) DeleteRequestByState(ctx context.Context, state string) error

func (*SessionStore) DeleteSession

func (s *SessionStore) DeleteSession(ctx context.Context, did string) error

func (*SessionStore) GetRequestByState

func (s *SessionStore) GetRequestByState(ctx context.Context, state string) (*OAuthRequest, error)

func (*SessionStore) GetSession

func (s *SessionStore) GetSession(ctx context.Context, did string) (*OAuthSession, error)

func (*SessionStore) RefreshSession

func (s *SessionStore) RefreshSession(ctx context.Context, did, access, refresh, expiry string) error

func (*SessionStore) SaveRequest

func (s *SessionStore) SaveRequest(ctx context.Context, request OAuthRequest) error

SaveRequest stores the OAuth request to be later fetched in the callback. Since the fetching happens by comparing the state we get in the callback params, we store an additional state->did mapping which then lets us fetch the whole OAuth request.

func (*SessionStore) SaveSession

func (s *SessionStore) SaveSession(ctx context.Context, session OAuthSession) error

func (*SessionStore) UpdateNonce

func (s *SessionStore) UpdateNonce(ctx context.Context, did, nonce string) error

Source Files

  • store.go

Jump to

Keyboard shortcuts

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