Documentation
¶
Index ¶
- type OAuthRequest
- type OAuthSession
- type SessionStore
- func (s *SessionStore) DeleteRequestByState(ctx context.Context, state string) error
- func (s *SessionStore) DeleteSession(ctx context.Context, did string) error
- func (s *SessionStore) GetRequestByState(ctx context.Context, state string) (*OAuthRequest, error)
- func (s *SessionStore) GetSession(ctx context.Context, did string) (*OAuthSession, error)
- func (s *SessionStore) RefreshSession(ctx context.Context, did, access, refresh, expiry string) error
- func (s *SessionStore) SaveRequest(ctx context.Context, request OAuthRequest) error
- func (s *SessionStore) SaveSession(ctx context.Context, session OAuthSession) error
- func (s *SessionStore) UpdateNonce(ctx context.Context, did, nonce string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OAuthRequest ¶
type OAuthSession ¶
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
Source Files
¶
- store.go
Click to show internal directories.
Click to hide internal directories.