Skip to content

Commit

Permalink
moving access
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermesilveira committed Jul 20, 2012
1 parent b6fd033 commit 4fca76f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
13 changes: 13 additions & 0 deletions src/main/java/br/com/caelum/vraptor/mauth/Access.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package br.com.caelum.vraptor.mauth;

import br.com.caelum.vraptor.Option;
import br.com.caelum.vraptor.ioc.ComponentFactory;

public interface Access<T> extends ComponentFactory<T>, PossibleUser {

void login(Long id);

Option<T> currentUser();

void logout();
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package br.com.caelum.vraptor.mauth;

import br.com.caelum.gnarus.auth.Access;
import br.com.caelum.vraptor.environment.Environment;

public abstract class BasicAuthenticator<T extends SystemUser> implements Authenticator<T> {
Expand All @@ -24,8 +23,8 @@ public void signout() {
system.logout();
}

public void authenticate(User toLogin) {
system.login(toLogin.getId());
public void authenticate(SystemUser toLogin) {
system.login((Long) toLogin.getId());
}

}

0 comments on commit 4fca76f

Please sign in to comment.