mirror of https://github.com/apache/maven.git
MNG-4222: Introducing JSecurity to manage authentication against remote repositories
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@789079 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ba289ad502
commit
5f2cfdabb8
|
@ -0,0 +1,25 @@
|
|||
package org.apache.maven.repository.security;
|
||||
|
||||
import org.codehaus.plexus.component.annotations.Component;
|
||||
import org.codehaus.plexus.component.annotations.Requirement;
|
||||
import org.jsecurity.authc.AuthenticationException;
|
||||
import org.jsecurity.authc.AuthenticationInfo;
|
||||
import org.jsecurity.authc.AuthenticationToken;
|
||||
import org.jsecurity.authc.Authenticator;
|
||||
|
||||
@Component(role=RepositorySystemSecurityManager.class)
|
||||
public class DefaultRepositorySystemSecurityManager
|
||||
implements RepositorySystemSecurityManager
|
||||
{
|
||||
@Requirement
|
||||
private Authenticator authenticator;
|
||||
|
||||
public AuthenticationInfo authenticate( AuthenticationToken token )
|
||||
throws AuthenticationException
|
||||
{
|
||||
AuthenticationInfo authenticationInfo = authenticator.authenticate( token );
|
||||
|
||||
return authenticationInfo;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package org.apache.maven.repository.security;
|
||||
|
||||
import org.jsecurity.authc.AuthenticationException;
|
||||
import org.jsecurity.authc.AuthenticationInfo;
|
||||
import org.jsecurity.authc.AuthenticationToken;
|
||||
|
||||
public interface RepositorySystemSecurityManager
|
||||
{
|
||||
public AuthenticationInfo authenticate( AuthenticationToken token )
|
||||
throws AuthenticationException;
|
||||
}
|
Loading…
Reference in New Issue