Documentation
¶
Index ¶
- type AuthStateInMemoryStore
- func (s *AuthStateInMemoryStore) CreateAuthcode(authID string) (string, error)
- func (s *AuthStateInMemoryStore) CreateNewAuthSession(pkt *pktoken.PKToken, ruri string, nonce string) (string, error)
- func (s *AuthStateInMemoryStore) LookupAuthState(authID string) (*cosigner.AuthState, bool)
- func (s *AuthStateInMemoryStore) RedeemAuthcode(authcode string) (cosigner.AuthState, string, error)
- func (s *AuthStateInMemoryStore) UpdateAuthState(authID string, authState cosigner.AuthState) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthStateInMemoryStore ¶
type AuthStateInMemoryStore struct {
AuthIDIssuer *cosigner.AuthIDIssuer
AuthStateMap map[string]*cosigner.AuthState
AuthCodeMap map[string]string
AuthStateMapLock sync.RWMutex
AuthcodeMapLock sync.RWMutex
}
This is intended for testing purposes. The locking strategy used is not particularly efficient. Anyone building a Cosigner should use the interface above to replace this in-memory store with a database.
func NewAuthStateInMemoryStore ¶
func NewAuthStateInMemoryStore(hmacKey []byte) *AuthStateInMemoryStore
func (*AuthStateInMemoryStore) CreateAuthcode ¶
func (s *AuthStateInMemoryStore) CreateAuthcode(authID string) (string, error)
func (*AuthStateInMemoryStore) CreateNewAuthSession ¶
func (*AuthStateInMemoryStore) LookupAuthState ¶
func (s *AuthStateInMemoryStore) LookupAuthState(authID string) (*cosigner.AuthState, bool)
Writes to the AuthState are not concurrency safe, do not write
func (*AuthStateInMemoryStore) RedeemAuthcode ¶
func (*AuthStateInMemoryStore) UpdateAuthState ¶
func (s *AuthStateInMemoryStore) UpdateAuthState(authID string, authState cosigner.AuthState) error
Click to show internal directories.
Click to hide internal directories.