You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/03/14 18:02:23 UTC
cxf-fediz git commit: Showing client related tokens which were
authorized by the current user
Repository: cxf-fediz
Updated Branches:
refs/heads/master 7ace71a96 -> d1adf658c
Showing client related tokens which were authorized by the current user
Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/d1adf658
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/d1adf658
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/d1adf658
Branch: refs/heads/master
Commit: d1adf658c214b2720d7e339acb662dcea2d66fcf
Parents: 7ace71a
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Mon Mar 14 17:02:08 2016 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Mon Mar 14 17:02:08 2016 +0000
----------------------------------------------------------------------
.../service/oidc/clients/ClientRegistrationService.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/d1adf658/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
index 4ecc2c0..9c78c34 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
@@ -141,15 +141,13 @@ public class ClientRegistrationService {
}
protected ClientTokens doGetClientIssuedTokens(Client c) {
- // Right now the user who is registering the clients
- // is the one who is working with them, i.e, client registrations
- // are user specific, so passing null is OK
Comparator<ServerAccessToken> tokenComp = new TokenComparator();
+ UserSubject subject = new UserSubject(getUserName());
List<ServerAccessToken> accessTokens =
- new ArrayList<ServerAccessToken>(dataProvider.getAccessTokens(c, null));
+ new ArrayList<ServerAccessToken>(dataProvider.getAccessTokens(c, subject));
Collections.sort(accessTokens, tokenComp);
List<RefreshToken> refreshTokens =
- new ArrayList<RefreshToken>(dataProvider.getRefreshTokens(c, null));
+ new ArrayList<RefreshToken>(dataProvider.getRefreshTokens(c, subject));
Collections.sort(refreshTokens, tokenComp);
return new ClientTokens(c, accessTokens, refreshTokens);
}