Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/islax/microapp
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarmrr committed Jul 25, 2019
2 parents 9fa762c + 8e7552c commit ad3fbfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion security/Token.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ func (token *JwtToken) isValidForScope(allowedScopes []string) bool {
if ok, _ := inArray(allowedScope, token.Scopes); !ok {
scopeParts := strings.Split(allowedScope, ":")
if ok, _ := inArray(scopeParts[0]+":*", token.Scopes); !ok {
allScopesMatched = false
if ok, _ := inArray("*:"+scopeParts[1], token.Scopes); !ok {
allScopesMatched = false
}
}
}
}
Expand Down

0 comments on commit ad3fbfd

Please sign in to comment.