Fix login issues regarding basicauth+noauth #214 #204

This commit is contained in:
Henrique Dias
2017-08-22 15:25:54 +01:00
parent 1aa68b0dd0
commit c95b1aaace
9 changed files with 318 additions and 315 deletions

View File

@@ -59,7 +59,6 @@ func renewAuthHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (in
// claims is the JWT claims.
type claims struct {
fm.User
NoAuth bool `json:"noAuth"`
jwt.StandardClaims
}
@@ -74,7 +73,6 @@ func printToken(c *fm.Context, w http.ResponseWriter) (int, error) {
// Builds the claims.
claims := claims{
u,
c.NoAuth,
jwt.StandardClaims{
ExpiresAt: time.Now().Add(time.Hour * 24).Unix(),
Issuer: "File Manager",