I have followed this demo implementing login using spring security and openid.
I am successful implementing it, But using spring security I have to provide the user details in the userservice
section of spring-security.xml
<security:user name="http://krams915.myopenid.com/" password="" authorities="ROLE_USER, ROLE_ADMIN" />
I want to implement register and login cycle through openid in one go. I am not getting how to go ahead without providing username in userservice, as the user that visits my site will not be registered previously.
Any help or guidance would be great.
Thanks in Advance.
The openid
sample with spring security has some examples of using the attribute-exchange
tag to pull data from OpenId providers. This will let you grab required data (or at least some of it) for users, especially if they are coming in new.
The CustomUserDetailsService
in that example also shows one possible way to create new accounts in your application when new users come in via OpenId that links their OpenId identifier to a new user account within your application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With