SpringSecurityService.getCurrentUser and special user type

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SpringSecurityService.getCurrentUser and special user type

asafdav2
In my app I use spring security core and derive a specia User class (class User extends SecUser, where SecUser was created by the s2-quickstart script). The problem is with the SpringSecurityService.getCurrentUser() method - it returns SecUser instances and apparently I'm not allowed to cast them to User - what can I do?
Reply | Threaded
Open this post in threaded view
|

RE: SpringSecurityService.getCurrentUser and special user type

netwiser
You have to implement your customized UserDetailService to cast the user to your own user instance.

http://burtbeckwith.github.com/grails-spring-security-core/docs/manual/guide/11%20Custom%20UserDetailsService.html


Regards,

-J

> Date: Mon, 14 Feb 2011 11:39:05 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: [grails-user] SpringSecurityService.getCurrentUser and special user type
>
>
> In my app I use spring security core and derive a specia User class (class
> User extends SecUser, where SecUser was created by the s2-quickstart
> script). The problem is with the SpringSecurityService.getCurrentUser()
> method - it returns SecUser instances and apparently I'm not allowed to cast
> them to User - what can I do?
> --
> View this message in context: http://grails.1312388.n4.nabble.com/SpringSecurityService-getCurrentUser-and-special-user-type-tp3305662p3305662.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>