Skip to content

Commit 75d8855

Browse files
committed
Address review comments
1 parent eaba6be commit 75d8855

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/OAuth2Constants.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ public static class TokenBinderType {
3434
public static final String CLIENT_REQUEST = "client-request";
3535

3636
}
37+
38+
/**
39+
* Constants for token types.
40+
*/
41+
public static class TokenTypes {
42+
43+
public static final String OPAQUE = "Opaque";
44+
public static final String JWT = "jwt";
45+
46+
}
47+
3748
public static final String GROUPS = "groups";
3849
public static final String ENTITY_ID = "entity_id";
3950
public static final String IS_CONSENTED = "is_consented";

components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/OauthTokenIssuer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
2525
import org.wso2.carbon.identity.oauth2.authz.OAuthAuthzReqMessageContext;
2626

27+
import static org.wso2.carbon.identity.oauth2.OAuth2Constants.TokenTypes.OPAQUE;
28+
2729
/**
2830
* OAuth 2 access token issuer.
2931
*/
@@ -106,6 +108,7 @@ default String issueSubjectToken(OAuthAuthzReqMessageContext oauthAuthzMsgCtx) t
106108
* @return The type of the token (e.g., "JWT" or "Opaque").
107109
*/
108110
default String getAccessTokenType() {
109-
return "Opaque";
111+
112+
return OPAQUE;
110113
}
111114
}

0 commit comments

Comments
 (0)