Package io.milton.http.http11.auth
Class LdapSecurityManager
java.lang.Object
io.milton.http.http11.auth.LdapSecurityManager
- All Implemented Interfaces:
SecurityManager
NOT TESTED YET!!!!!!
From here: http://www.forumeasy.com/forums/thread.jsp?tid=115170863235&fid=ldapprof5&highlight=Why+DIGEST-MD5+Authentication+Does+Work
Server: AD 2003
Client: JNDI application
User: cn=testuser,cn=users,dc=mydomain,dc=com
Realm: MYREALM
Passwd: (password stored in hash format)
The following settings works
env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5");
env.put(Context.SECURITY_PRINCIPAL, "testuser");
The following settings dose NOT works
env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5");
env.put(Context.SECURITY_PRINCIPAL, "MYREAM\\testuser");
The following settings dose NOT works
env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5");
env.put(Context.SECURITY_PRINCIPAL, "testuser@mydomain.com");
- Author:
- brad
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(DigestResponse digestRequest) Authenticate a digest requestauthenticate(String user, String password) booleanauthorise(Request request, Request.Method method, Auth auth, Resource resource) Check that the authenticater user can access the given resource for the given method.booleanbooleanvoidsetEnableDigest(boolean enableDigest) voidsetLdapUrl(String ldapUrl) void
-
Constructor Details
-
LdapSecurityManager
public LdapSecurityManager()
-
-
Method Details
-
authenticate
Description copied from interface:SecurityManagerAuthenticate a digest request- Specified by:
authenticatein interfaceSecurityManager- Returns:
- See Also:
-
authenticate
- Specified by:
authenticatein interfaceSecurityManager- Returns:
- - some object representing the user to associate with the request
-
authorise
Description copied from interface:SecurityManagerCheck that the authenticater user can access the given resource for the given method.- Specified by:
authorisein interfaceSecurityManager- Parameters:
request- - the request itselfmethod- - the request methodauth- - authentication object representing the current userresource- - the resource being operated on- Returns:
- - true to indicate that the user is allowed access
-
getRealm
- Specified by:
getRealmin interfaceSecurityManager- Returns:
- - the name of the security realm this is managing
-
setRealm
-
isDigestAllowed
public boolean isDigestAllowed()- Specified by:
isDigestAllowedin interfaceSecurityManager
-
setEnableDigest
public void setEnableDigest(boolean enableDigest) -
isEnableDigest
public boolean isEnableDigest() -
getLdapUrl
-
setLdapUrl
-