You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by rm...@apache.org on 2020/11/10 16:52:16 UTC
[openwebbeans-meecrowave] branch master updated: make it simpler to
customize the jwt by making the callbacks in oauth2configurer overridable
This is an automated email from the ASF dual-hosted git repository.
rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans-meecrowave.git
The following commit(s) were added to refs/heads/master by this push:
new bd2f494 make it simpler to customize the jwt by making the callbacks in oauth2configurer overridable
bd2f494 is described below
commit bd2f4941372d65403e27d7d245fd81bedd730395
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Tue Nov 10 17:52:10 2020 +0100
make it simpler to customize the jwt by making the callbacks in oauth2configurer overridable
---
.../meecrowave/oauth2/configuration/OAuth2Configurer.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/meecrowave-oauth2-minimal/src/main/java/org/apache/meecrowave/oauth2/configuration/OAuth2Configurer.java b/meecrowave-oauth2-minimal/src/main/java/org/apache/meecrowave/oauth2/configuration/OAuth2Configurer.java
index 94f9865..f5871ce 100644
--- a/meecrowave-oauth2-minimal/src/main/java/org/apache/meecrowave/oauth2/configuration/OAuth2Configurer.java
+++ b/meecrowave-oauth2-minimal/src/main/java/org/apache/meecrowave/oauth2/configuration/OAuth2Configurer.java
@@ -463,21 +463,21 @@ public class OAuth2Configurer {
return userSubject;
}
- private void forwardRolesAsClaims(final UserSubject subject) {
+ protected void forwardRolesAsClaims(final UserSubject subject) {
if (configuration.isForwardRoleAsJwtClaims() && subject.getRoles() != null) {
subject.setProperties(new HashMap<>());
subject.getProperties().put("claim.roles", String.join(", ", subject.getRoles()));
}
}
- private void forwardClaims(final Client client, final UserSubject subject,
- final ServerAccessToken serverAccessToken) {
+ protected void forwardClaims(final Client client, final UserSubject subject,
+ final ServerAccessToken serverAccessToken) {
forwardClientClaims(client, serverAccessToken);
forwardUserClaims(subject, serverAccessToken);
}
- private void forwardUserClaims(final UserSubject subject,
- final ServerAccessToken serverAccessToken) {
+ protected void forwardUserClaims(final UserSubject subject,
+ final ServerAccessToken serverAccessToken) {
if (subject.getProperties() == null || subject.getProperties().isEmpty()) {
return;
}