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

Exception using Resource Owner flow #849

Closed
lomori opened this issue Jun 22, 2015 · 0 comments
Closed

Exception using Resource Owner flow #849

lomori opened this issue Jun 22, 2015 · 0 comments

Comments

@lomori
Copy link
Contributor

lomori commented Jun 22, 2015

Enabled Resource Owner flow by updating DefaultOAuth2ProviderTokenService:

<oauth:authorization-server ... >

...
<oauth:password authentication-manager-ref="authenticationManager" />
...
/oauth:authorization-server

But got the exception below:

root cause

java.lang.NumberFormatException: null
java.lang.Long.parseLong(Long.java:552)
java.lang.Long.parseLong(Long.java:631)
org.mitre.openid.connect.service.impl.DefaultOIDCTokenService.createIdToken(DefaultOIDCTokenService.java:112)
org.mitre.openid.connect.token.ConnectTokenEnhancer.enhance(ConnectTokenEnhancer.java:128)
org.mitre.oauth2.service.impl.DefaultOAuth2ProviderTokenService.createAccessToken(DefaultOAuth2ProviderTokenService.java:178)
org.mitre.oauth2.service.impl.DefaultOAuth2ProviderTokenService.createAccessToken(DefaultOAuth2ProviderTokenService.java:64)
org.springframework.security.oauth2.provider.token.AbstractTokenGranter.getAccessToken(AbstractTokenGranter.java:70)

The code in DefaultOIDCTokenService is expecting the authorization time to be present, which is at some earlier point set by AuthenticationTimeStamper called as an event handler for successful logins from the login page. However since the Resource Owner doesn't have a login page the event is not triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant