Feat v0.6.9 cookie fix roadmap (#44)
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #44.
This commit is contained in:
@@ -24,13 +24,17 @@ func (p *BuiltinProvider) SupportsRegistration() bool { return true }
|
||||
|
||||
func (p *BuiltinProvider) Authenticate(c *gin.Context, stores store.Stores) (*Result, error) {
|
||||
var req struct {
|
||||
Login string `json:"login" binding:"required"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
Login string `json:"login" binding:"required"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
KeepLogin bool `json:"keep_login"`
|
||||
}
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Stash keep_login in context for generateTokens
|
||||
c.Set("keep_login", req.KeepLogin)
|
||||
|
||||
user, err := stores.Users.GetByLogin(c.Request.Context(), req.Login)
|
||||
if err != nil {
|
||||
return nil, ErrInvalidCreds
|
||||
|
||||
Reference in New Issue
Block a user