Permalink
Browse files

remove unnecessary casting

  • Loading branch information...
1 parent fef7874 commit 289011e3c47b6ff545fa941319cfcbb5b77d6066 @splix committed Feb 6, 2012
@@ -20,7 +20,7 @@ public class FacebookAuthProvider implements AuthenticationProvider {
public Authentication authenticate(Authentication authentication) {
FacebookAuthToken token = authentication
- FacebookUserDomain user = facebookAuthDao.findUser(token.uid as Long)
+ def user = facebookAuthDao.findUser(token.uid as Long)
if (user == null) {
//log.debug "New person $token.uid"
@@ -48,7 +48,7 @@ public class FacebookAuthProvider implements AuthenticationProvider {
return FacebookAuthToken.isAssignableFrom(authentication);
}
- protected UserDetails createUserDetails(FacebookUserDomain user, String secret) {
+ protected UserDetails createUserDetails(Object user, String secret) {
Collection<GrantedAuthority> roles = facebookAuthDao.getRoles(user)
new User(user.uid.toString(), secret, true,
true, true, true, roles)
@@ -1,7 +1,6 @@
${packageDeclaration}
import com.the6hours.grails.springsecurity.facebook.FacebookAuthDao
-import com.the6hours.grails.springsecurity.facebook.FacebookUserDomain
import com.the6hours.grails.springsecurity.facebook.FacebookAuthToken
import org.springframework.security.core.GrantedAuthority
import org.apache.log4j.Logger
@@ -1,15 +1,11 @@
${domainPackageDeclaration}
-import com.the6hours.grails.springsecurity.facebook.FacebookUserDomain
-
import ${userClassFullName}
-class ${domainClassName} implements FacebookUserDomain {
+class ${domainClassName} {
long uid
- String secret
- String session
- String email
+ String accessToken
static belongsTo = [user: ${userClassName}]

0 comments on commit 289011e

Please sign in to comment.