Package io.milton.http
Class ReadOnlySecurityManager
java.lang.Object
io.milton.http.ReadOnlySecurityManager
- All Implemented Interfaces:
SecurityManager
- 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.Will return the configured realm if it is not null.boolean
-
Constructor Details
-
ReadOnlySecurityManager
-
ReadOnlySecurityManager
public ReadOnlySecurityManager()
-
-
Method Details
-
authenticate
- Specified by:
authenticatein interfaceSecurityManager- Returns:
- - some object representing the user to associate with the request
-
authenticate
Description copied from interface:SecurityManagerAuthenticate a digest request- Specified by:
authenticatein interfaceSecurityManager- Returns:
- See Also:
-
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
Will return the configured realm if it is not null. Otherwise, will return the requested hostname as the realm if it is not blank, otherwise will return "ReadOnlyRealm"- Specified by:
getRealmin interfaceSecurityManager- Parameters:
host- - the requested host name- Returns:
-
isDigestAllowed
public boolean isDigestAllowed()- Specified by:
isDigestAllowedin interfaceSecurityManager
-