SK.gnome.dwarf.http.auth
Class HTTPPathPermission

java.lang.Object
  extended byjava.security.Permission
      extended bySK.gnome.dwarf.http.auth.HTTPPathPermission
All Implemented Interfaces:
java.security.Guard, java.io.Serializable

public class HTTPPathPermission
extends java.security.Permission

This class implements the permission based on a HTTP request.

It is used in defining the security constraints in the context of a web application. Granting the HTTPPathPermission to a set of principals causes the subject represented by those principals to gain access to the given URI path via the given HTTP methods.

The path argument can be either the exact path, or a path mapping pattern. The pattern must be specified with the "*" wildcard character. The actions argument must be a comma-separated list of the following HTTP methods: GET, POST, HEAD, PUT, DELETE, TRACE, OPTIONS. In addition, it accepts also these WebDAV-specific methods: PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK. The single wildcard "*" character can be also used to represent all possible methods.

The "!" special character at the beginning of the path mapping represents an effective complement to the actual mapping pattern.

Examples of the path mappings:

See Also:
Serialized Form

Constructor Summary
HTTPPathPermission(java.lang.String path, java.lang.String actions)
          Creates a new HTTPPathPermission.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getActions()
          Returns the permission actions.
 int hashCode()
           
 boolean implies(java.security.Permission p)
           
 java.lang.String toString()
           
 
Methods inherited from class java.security.Permission
getName, checkGuard, newPermissionCollection
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTTPPathPermission

public HTTPPathPermission(java.lang.String path,
                          java.lang.String actions)
Creates a new HTTPPathPermission.

Parameters:
path - the request path mapping
actions - the comma-separated list of allowed HTTP methods
Method Detail

getActions

public java.lang.String getActions()
Returns the permission actions.

A comma-separated list of HTTP methods is returned by this method.

Returns:
the list of HTTP methods

implies

public boolean implies(java.security.Permission p)

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

toString

public java.lang.String toString()


Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.