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

Extend BasicProfile with extra fields #513

Open
fjcano-stratio opened this issue Jan 22, 2015 · 5 comments
Open

Extend BasicProfile with extra fields #513

fjcano-stratio opened this issue Jan 22, 2015 · 5 comments

Comments

@fjcano-stratio
Copy link

Hello,

I would like to extend BasicProfile with extra fields. Could you tell me if it is possible? I tried several ways but I'm not able to get when request currend user:

SecureSocial.currentUser[ExtendedProfile]
class ExtendedProfile(...) extends BasicProfile(

I get errors for several methods when I try to change AuthenticationSercice to ExtendedProfile.

AutenticationService @Inject() (userDao: UserDAO, tokenDao: TokenDAO) extends securesocial.core.services.UserService[BasicProfile] 

Is it related with #477 ?

I'm working with play 2.3 and Scala

Thanks a lot.

@jaliss
Copy link
Owner

jaliss commented Feb 1, 2015

Why do you want to extend BasicProfile? Is it because you are trying to get more data from the identity providers or do you want those extra fields in the actions?

@fjcano-stratio
Copy link
Author

Hello jaliss,

I want to get more data from the identity providers and expose them in the session.

Await.result(SecureSocial.currentUser[BasicProfile], 1 minute) match {
      case Some(user) => {
        if (user.EXTENDED_DATA

Do you provide a mechanism to expose it?

Regards,

@fjcano-stratio
Copy link
Author

Hello @jaliss ,

Could you help me out with it?

Thanks,

@fjcano-stratio
Copy link
Author

Hello @jaliss ,

Could you help me out with it?

Thanks,

@k4200
Copy link

k4200 commented Dec 15, 2015

This is an old thread, but for those seeing it in the future. I did something similar in the PR below:
#558

I'm using a fork version with this commit for our own purpose. If you use Play 2.3.x (not 2.4.x), you can try it:
http://search.maven.org/#search|gav|1|g%3A%22tv.kazu%22%20AND%20a%3A%22securesocial_2.11%22

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

3 participants