Spring security integration with open id in grails -



Spring security integration with open id in grails -

i working on integrating spring security openid grails application using springsecurity core , springsecurity openid plugins. have integrated it, , works need access email logged in person. how can that, able access token used identifying person.

thanks ian roberts. gives me reply,which solves problem. his reply was:

as happens implemented in 1 of applications yesterday :-) unfortunately it's not open-source app can't point @ code can explain did.

the spring-security-openid plugin supports "attribute exchange" mechanism of openid, although back upwards not documented much (if @ all). how works depends on provider @ far end @ to the lowest degree worked me using google , yahoo.

in order request email address provider need add together next config.groovy:

grails.plugins.springsecurity.openid.registration.requiredattributes.email = "http://axschema.org/contact/email"

now wire user registration process need email field in s2 user domain class, , need edit generated openidcontroller.groovy in few places.

add email property openidregistercommand

in createaccount action there's line "if(!createnewaccount(...))" passes username, password , openid parameters. alter along method definition pass whole command object instead of these 2 fields.

in createnewaccount pass email value forwards command object user domain object constructor.

and add together input field email grails-app/views/openid/createaccount.gsp.

you can same other attributes such total name.

grails.plugins.springsecurity.openid.registration.requiredattributes.fullname = "http://axschema.org/nameperson"

the of import thing wire thing after lastly dot next requiredattributes (fullname in example) must match name of property on openidregistercommand.

regards charu jain

security grails spring-security openid google-openid

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -