fix
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
575414b329
commit
213a7db661
|
@ -228,8 +228,8 @@ func RenewToken(s *xorm.Session, c echo.Context) (token string, err error) {
|
|||
}
|
||||
return NewUserJWTAuthtoken(u)
|
||||
}
|
||||
if authProvider, ok := authProviders[claims.Type]; ok {
|
||||
return "", echo.NewHTTPError(http.StatusBadRequest, models.Message{Message: "External auth types do not use JWT tokens."}
|
||||
if _, ok := authProviders[claims.Type]; ok {
|
||||
return "", echo.NewHTTPError(http.StatusBadRequest, models.Message{Message: "External auth types do not use JWT tokens."})
|
||||
}
|
||||
return "", echo.NewHTTPError(http.StatusBadRequest, models.Message{Message: "Invalid JWT token."})
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ import (
|
|||
"time"
|
||||
|
||||
"code.vikunja.io/api/pkg/db"
|
||||
|
||||
"code.vikunja.io/api/pkg/config"
|
||||
"code.vikunja.io/api/pkg/modules/auth"
|
||||
"code.vikunja.io/api/pkg/user"
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
|
@ -83,7 +81,7 @@ func newIAPUserJWTAuthClaims(u *user.User) (claims *auth.AuthClaims) {
|
|||
func (p IAPAuthProvider) GetUser(c echo.Context, authClaims *auth.AuthClaims) (*user.User, error) {
|
||||
// The IAP middleware already checked and created a user if needed, no need to regenerate them
|
||||
// Just use the authClaims provided by the middleware
|
||||
u = &user.User{
|
||||
u := &user.User{
|
||||
ID: authClaims.UserID,
|
||||
Email: authClaims.UserEmail,
|
||||
Username: authClaims.UserUsername,
|
||||
|
|
Loading…
Reference in New Issue