Documentation ¶
Index ¶
- func CreateToken(ctx context.Context, db *sql.DB, login, token_type string, expiresAt time.Time) (string, error)
- func ExtractTokenID(t string) (string, error)
- func InitDB(ctx context.Context, db *sql.DB) error
- func Login(ctx context.Context, db *sql.DB, login string, plainPass []byte) (string, error)
- func OpenDir(ctx context.Context, dir string) (*sql.DB, error)
- func OpenMemory(ctx context.Context) (*sql.DB, error)
- func RegisterUser(ctx context.Context, db *sql.DB, login string, passwd []byte) (string, error)
- func ReplacePassword(ctx context.Context, db *sql.DB, login string, newpass []byte) error
- func RevokeToken(ctx context.Context, db *sql.DB, tokenID string) error
- func TokenLogin(ctx context.Context, db *sql.DB, token string) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
func ExtractTokenID ¶
func RegisterUser ¶
RegisterUser with the given login and password
func ReplacePassword ¶
ReplacePassword of given user
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.