Documentation ¶
Index ¶
- func AddUser(mongo *mongo.Client, login, password string) (string, error)
- func CreateClient(connectionString string) (*mongo.Client, error)
- func DefaultClient() *mongo.Client
- func FindUserByAuthorizationCode(mongo *mongo.Client, code string) (*models.User, error)
- func FindUserByLogin(mongo *mongo.Client, login string) (*models.User, error)
- func FindUserByRefreshToken(mongo *mongo.Client, refreshToken string) (*models.User, error)
- func RevokeRefreshToken(mongo *mongo.Client, login string) error
- func UpdateAccessToken(mongo *mongo.Client, login, accessToken string, validUntil time.Time) error
- func UpdateAuthorizationCode(mongo *mongo.Client, login, code string, codeValidUntil time.Time) error
- func UpdateRefreshToken(mongo *mongo.Client, login, refreshToken, accessToken string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClient ¶
CreateClient opens mongodb connection and returns client
func FindUserByAuthorizationCode ¶
FindUserByAuthorizationCode returns user with given code
func FindUserByLogin ¶
FindUserByLogin returns user with given login
func FindUserByRefreshToken ¶
FindUserByRefreshToken returns user with given refresh token
func RevokeRefreshToken ¶
RevokeRefreshToken revokes refresh and access token for login
func UpdateAccessToken ¶
UpdateAccessToken updates access token for login
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.