Skip to content

Commit

Permalink
Check if subject is not null before checking if equal to client_id
Browse files Browse the repository at this point in the history
For client credentials grant when grant type is not specified
  • Loading branch information
mpgxvii authored Sep 26, 2024
1 parent f2af901 commit 691204b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ interface RadarToken {
* @return true if the client credentials flow was certainly used, false otherwise.
*/
val isClientCredentials: Boolean
get() = grantType == CLIENT_CREDENTIALS || subject == clientId
get() = grantType == CLIENT_CREDENTIALS || (subject != null && subject == clientId)

fun copyWithRoles(roles: Set<AuthorityReference>): RadarToken

Expand Down

0 comments on commit 691204b

Please sign in to comment.