Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLTokenManager ¶
type SQLTokenManager struct {
// contains filtered or unexported fields
}
SQLTokenManager is a TokenManager that writes and retrieves data from a SQL database, it expects to have a table named "tokens" to read/write from
func NewSQLTokenManager ¶
func NewSQLTokenManager(db *sql.DB, driver string) *SQLTokenManager
NewSQLTokenManager creates a new token manager from the given database and driver
func (*SQLTokenManager) Get ¶
func (m *SQLTokenManager) Get(subject string) (string, error)
Get returns the stored token
func (*SQLTokenManager) Set ¶
func (m *SQLTokenManager) Set(subject, value string) error
Set sets or updates the stored token
Click to show internal directories.
Click to hide internal directories.