-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 70: Role Urls in Tokens should be kept unchanged upon creating / parsing tokens. #71
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 18ec389.
tochi-y
reviewed
Nov 20, 2019
Co-Authored-By: Tochiori Yausufmi <32325140+tochi-y@users.noreply.github.com>
shimono
changed the title
Feature 70
Feature 70: Role Url in TransCellAccessToken should be Role class URL
Nov 27, 2019
shimono
changed the title
Feature 70: Role Url in TransCellAccessToken should be Role class URL
Feature 70: Role Url in TranceCellAccessToken/VisitorRefreshToken should be Role Class URL.
Nov 27, 2019
shimono
commented
Nov 27, 2019
src/test/java/io/personium/common/auth/token/TransCellAccessTokenTest.java
Show resolved
Hide resolved
src/test/java/io/personium/common/auth/token/TransCellAccessTokenTest.java
Show resolved
Hide resolved
tochi-y
reviewed
Nov 29, 2019
@shimono this PR is still working? If it's working, add WIP to the title. |
shimono
changed the title
Feature 70: Role Url in TranceCellAccessToken/VisitorRefreshToken should be Role Class URL.
Fix 70: Role Urls in TranceCellAccessToken should be kept unchanged upon creating / parsing tokens.
Nov 29, 2019
shimono
changed the title
Fix 70: Role Urls in TranceCellAccessToken should be kept unchanged upon creating / parsing tokens.
WIP: Fix 70: Role Urls in Tokens should be kept unchanged upon creating / parsing tokens.
Nov 29, 2019
…d dubious methods are marked deprecated.
…ocking tests to minimize the use of mocking. Probably, the target method itself (refreshAccessToken) is useless. It can easily be substituted with AccessToken Constructor.
shimono
changed the title
WIP: Fix 70: Role Urls in Tokens should be kept unchanged upon creating / parsing tokens.
Fix 70: Role Urls in Tokens should be kept unchanged upon creating / parsing tokens.
Nov 29, 2019
Let me merge this PR to dev branch for the following reasons.
|
Merged
tochi-y
reviewed
Dec 9, 2019
@@ -159,7 +147,8 @@ public static VisitorRefreshToken parse(final String token, final String issuer) | |||
String[] extra = ret.populate(token.substring(PREFIX_TC_REFRESH.length()), issuer, 3); | |||
ret.id = extra[IDX_ID]; | |||
ret.originalIssuer = extra[IDX_ORIG_ISSUER]; | |||
ret.roleList = AbstractOAuth2Token.parseRolesString(extra[IDX_ORIG_ROLE_LIST]); | |||
// Role class url list is there in Visitor Refresh Tokens | |||
ret.roleList = AbstractOAuth2Token.parseSpaceSeparatedRoleClassUrlString(extra[IDX_ORIG_ROLE_LIST]); | |||
return ret; | |||
} catch (MalformedURLException e) { | |||
throw AbstractOAuth2Token.PARSE_EXCEPTION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to include MalformedURLException to TokenParseException.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Role Url in tokens should be as follows:
This fix is necessary to fix the following problem of personium-core
personium/personium-core#516