我正在尝试使用扩展BaseAuthenticator的@PicketLinked类.
我的设置是一个关于野生动物9.0.2.Final的耳朵项目.
我在我的jboss-deployment-structure.xml中使用它
我的BaseAuthenticator类在我的ejb.jar中声明为以下内容
@RequestScoped
@PicketLink
public class PicketlinkAuthenticator extends BaseAuthenticator
我的LoginController配置如下:
@Path("/login")
public class LoginController {
@Inject
private Identity identity;
@Inject
private DefaultLoginCredentials credentials;
@GET
@Path("/dologin/{username}/{password}")
@Produces(MediaType.TEXT_PLAIN)
@Transactional(TxType.REQUIRED)
public String doLogin(@PathParam("username") String username, @PathParam("password") String password){
credentials.setUserId(username);
credentials.setPassword(password);
AuthenticationResult authResult=identity.login();
if(authResult.equals(AuthenticationResult.SUCCESS)){
return "success";
}else{
return "failed";
}
}
在调用identity.login()之后,我在日志中看到了这一点:
11:49:09,630 INFO [org.picketlink.idm] (default task-2) PLIDM001000: Bootstrapping PicketLink IDM Partition Manager
11:49:09,667 INFO [org.picketlink.idm.identity.store] (default task-2) PLIDM001001: Initializing Identity Store [class org.picketlink.idm.file.internal.FileIdentityStore]
11:49:09,679 WARN [org.picketlink.idm.identity.store.file] (default task-2) PLIDM001101: Working directory [C:\Users\bgadeyne\AppData\Local\Temp\pl-idm] is marked to be always created. All your existing data will be lost.
11:49:09,688 INFO [org.picketlink.idm.identity.store.file] (default task-2) PLIDM001100: Using working directory [C:\Users\bgadeyne\AppData\Local\Temp\pl-idm].
我的身份验证器的身份验证方法也有一些日志记录但是没有显示.
我在这里错过了什么?