Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Conversation

@deedee
Copy link
Contributor

@deedee deedee commented Dec 27, 2017

No description provided.

JWTToken jwtToken = null;
try {
decodedPayload = new JWTVerifier(DirectProperties.CLIENT_SECRET_AUTH0, DirectProperties.CLIENT_ID_AUTH0).verify(jwtCookie.getValue());
String[] knownIssuers = new String[]{ "https://" + DirectProperties.DOMAIN_AUTH0 };
Copy link
Collaborator

Choose a reason for hiding this comment

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

@deedee we used a different domain, like topcoder-dev.auth0.com, topcoder-newauth0.auth0.com, can you make it configurable through tokens.properties ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New token.properties added: @JWT_VALID_ISSUERS@. Named all issuers here, including issuer for old jwt (comma separate)

static {
JWT_OPTIONS = new DirectJWTSigner.Options();
JWT_OPTIONS.setAlgorithm(Algorithm.HS256);
JWT_OPTIONS.setAlgorithm(Algorithm.HMAC256(DirectProperties.CLIENT_SECRET_AUTH0.getBytes()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

@deedee why change this? will it backward compatible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New version of library is not backward compatible. So we need some adjustments regards on this

@skyhit skyhit changed the base branch from dev to jwttoken_update December 28, 2017 07:18
@skyhit skyhit merged commit ef285a7 into topcoder-archive:jwttoken_update Dec 29, 2017
@REG_SERVER_NAME@=tc.cloud.topcoder.com
@LDAP_AUTH0_CONNECTION_NAME@=vm-ldap-connection
@member.profile.url.base@=http://tc.cloud.topcoder.com
@JWT_VALID_ISSUERS@ = https://sma.auth0.com, https://newtc.auth0.com
Copy link
Collaborator

Choose a reason for hiding this comment

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

@deedee if you didn't set https://topcoder-newauth.auth0.com, will you pass the test? or it is purposely, you didn't put the correct value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will not pass . You need to list all issuers here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants