Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyglazyrindev committed Nov 7, 2021
1 parent 9d90122 commit c900a60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions blueprint/auth/interfaces/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
"net/http"
)

const TOKEN_HEADER_NAME = "AUTH-TOKEN"
const tokenHeaderName = "AUTH-TOKEN"

type TokenAuthProvider struct {
}

func (ap *TokenAuthProvider) GetUserFromRequest(c *gin.Context) core.IUser {
header := c.GetHeader(TOKEN_HEADER_NAME)
header := c.GetHeader(tokenHeaderName)
if header == "" {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion blueprint/auth/interfaces/token_with_expiration.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type TokenWithExpirationAuthProvider struct {
}

func (ap *TokenWithExpirationAuthProvider) GetUserFromRequest(c *gin.Context) core.IUser {
header := c.GetHeader(TOKEN_HEADER_NAME)
header := c.GetHeader(tokenHeaderName)
if header == "" {
return nil
}
Expand Down

0 comments on commit c900a60

Please sign in to comment.