Pergunta

I wonder what exactly is required when providing an implementation of UserService. In the InMemoryUserService.scala example the Identity objects are saved as is, but is it possible to only save a subset of the fields?

For instance, what are the consequences of not saving oAuth1Info / oAuth2Info (like in this implementation)? In my case the only thing I would need is a unique id: Int per user that is passed to my application whenever a user is logged in.

Foi útil?

Solução

It's up to you what you need to save. SecureSocial gives you all the information it can retrieve from the different providers. When you load it back from your UserService implementation then that object is passed onto your SecuredActions. The module only "passes" the object.

So, if you don't need the oAuthInfo fields just don't save them.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top