Skip to content

Conversation

sapessi
Copy link
Contributor

@sapessi sapessi commented Apr 20, 2017

Merge support for Cognito User Pool authorizers (Issue #24)

sapessi added 6 commits April 19, 2017 16:08
Fixed the principal id in the JaxRs security context to read the
subject property from the user pools authorizer claims. Fixed a bug in
the Claims object (private getSubject method). Added some comments to
the `ZonedDateTime` methods in the claims object. This should
completely address #24.
@sapessi sapessi requested a review from jt0 April 20, 2017 17:54
@sapessi sapessi self-assigned this Apr 20, 2017
@sapessi sapessi added this to the Release 0.5 milestone Apr 20, 2017
Copy link
Contributor

@jt0 jt0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, two minor comments.

@JsonProperty(value = "auth_time")
private Long authTime;
private String exp;
private String iat;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provide friendly names for "exp" and "iat" like you did for the others?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm providing friendly methods to get the parsed ZonedDateTime called getExpiration and getIssuesAt, that's why I left the raw fields with the same name as the original data

if (headerValue == null) {
return values;
}
int entryCounter = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used, forgot there from when I was using the counter to name the key if there was no other name specified. Good catch. Removed.

* Removed unused variable
* Removed methods parsing issue and expiration time for token
* Changed exp and iat getters and setters  to friendly names
@sapessi sapessi merged commit 8c08a8a into master Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants