Skip to content
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

NPE while creating test client #6

Closed
axandar opened this issue Sep 9, 2020 · 3 comments
Closed

NPE while creating test client #6

axandar opened this issue Sep 9, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@axandar
Copy link

axandar commented Sep 9, 2020

When registering test client, api returns 0 in client_secret_expires_at.
If client_secret_expires_at is 0, then RegisterResponse object is created with variable clientSecretExpiresAt as null.
At TestModeScimsClient#triggerRegistrationIfNeeded clientExpiration variable is set to response.getClientSecretExpiresAt().getTime() and gives NullPointerException.

Simple null check will create new registration request on every program run.
Maybe provide option to provide OpenID client details via constructor?

@nynymike
Copy link

nynymike commented Sep 9, 2020

Good find. @jgomer2001 can check it out.

@nynymike nynymike added the bug Something isn't working label Sep 9, 2020
jgomer2001 added a commit to GluuFederation/docs-gluu-server-prod that referenced this issue Sep 9, 2020
@jgomer2001
Copy link
Collaborator

Good catch @axandar . Formerly clients always had an expiration date in Gluu, so getClientSecretExpiresAt() never returned null. I adjusted to conform.

Likewise I added a new factory method so that developers can pass client ID/secret to avoid multiple registrations when testing.

Docs were updated in this regard.

Changes will be present in upcoming 4.2.1, meanwhile you can point to snapshot artifact:

<dependency>
  <groupId>org.gluu</groupId>
  <artifactId>scim-client</artifactId>
  <version>4.2.1-SNAPSHOT</version>
</dependency>

@jgomer2001
Copy link
Collaborator

Closing this. You can now use version 4.2.1.Final

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants