Class ReadOnlySecurityManager

java.lang.Object
io.milton.http.ReadOnlySecurityManager
All Implemented Interfaces:
SecurityManager

public class ReadOnlySecurityManager extends Object implements SecurityManager
Author:
brad
  • Constructor Details

    • ReadOnlySecurityManager

      public ReadOnlySecurityManager(String realm)
    • ReadOnlySecurityManager

      public ReadOnlySecurityManager()
  • Method Details

    • authenticate

      public Object authenticate(String user, String password)
      Specified by:
      authenticate in interface SecurityManager
      Returns:
      - some object representing the user to associate with the request
    • authenticate

      public Object authenticate(DigestResponse digestRequest)
      Description copied from interface: SecurityManager
      Authenticate a digest request
      Specified by:
      authenticate in interface SecurityManager
      Returns:
      See Also:
    • authorise

      public boolean authorise(Request request, Request.Method method, Auth auth, Resource resource)
      Description copied from interface: SecurityManager
      Check that the authenticater user can access the given resource for the given method.
      Specified by:
      authorise in interface SecurityManager
      Parameters:
      request - - the request itself
      method - - the request method
      auth - - authentication object representing the current user
      resource - - the resource being operated on
      Returns:
      - true to indicate that the user is allowed access
    • getRealm

      public String getRealm(String host)
      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:
      getRealm in interface SecurityManager
      Parameters:
      host - - the requested host name
      Returns:
    • isDigestAllowed

      public boolean isDigestAllowed()
      Specified by:
      isDigestAllowed in interface SecurityManager