Make scope nullable in TokenClaimsSet and its subclasses

Description

For legacy reasons, the scope value in TokenClaimsSet and its token-type specific subclasses is required to be non-null. The flows/endpoints are already compatible with the plain OAuth2 requests: unlike with OIDC, the use of scope is then optional.

For instance SetAuthorizationCodeToResponseContext has tackled the non-null requirement by setting an empty Scope object value to the claims set when scope has been absent in the authorization request. But obviously it should simply use null instead after the claims set allows it.

Environment

None

Activity

Henri MikkonenJune 7, 2024 at 6:44 AM

  • Switched scope into nullable in claims sets and builders

  • Changed authorization code and access token builders to set null instead of empty scope

    • SWF actions: BuildAccessToken and SetAuthorizationCodeToResponseContext

  • Updated and improved tests accordingly

Completed

Details

Assignee

Reporter

Components

Fix versions

Created June 5, 2024 at 12:53 PM
Updated July 2, 2024 at 11:53 AM
Resolved July 2, 2024 at 11:53 AM