Skip to content

Commit

Permalink
#1409 Avoid unhandled argument null exception for refresh_token grant…
Browse files Browse the repository at this point in the history
… in token validator when scopes missing
  • Loading branch information
Bartizan committed Sep 18, 2024
1 parent 765116a commit 7c02c77
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,15 @@ private async Task<TokenRequestValidationResult> ValidateRefreshTokenRequestAsyn
}
}

//////////////////////////////////////////////////////////
// validate scopes
//////////////////////////////////////////////////////////
if (_validatedRequest.RefreshToken.AuthorizedScopes == null)
{
LogError("Refresh token has no associated scopes");
return Invalid(OidcConstants.AuthorizeErrors.InvalidScope, "Invalid scope.");
}

//////////////////////////////////////////////////////////
// resource indicator
//////////////////////////////////////////////////////////
Expand Down

0 comments on commit 7c02c77

Please sign in to comment.