Package oracle.security.am.asdk
Class ResourceRequest
java.lang.Object
oracle.security.am.asdk.ResourceRequest
- All Implemented Interfaces:
Cloneable
Represents a resource request for which access operations are to be performed. ResourceRequest objects are used by the AuthenticationScheme constructors to retrieve information about the resource's authentication scheme and by the isAuthorized() method of the UserSession class to determine if a user is authorized to access the resource.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceRequest<wbr>(String resType, String resource, String operation)
Constructs a ResourceRequest object with specified resource type, name and operation.ResourceRequest<wbr>(String resType, String resource, String operation, Hashtable parameters)
Constructs a ResourceRequest object with specified resource type, name, operation and parameters name/value pair hashtable.ResourceRequest<wbr>(AccessClient aClient, String resType, String resource, String operation)
Constructs a ResourceRequest object with specified AccessClient object, resource type, name and operation.ResourceRequest<wbr>(AccessClient aClient, String resType, String resource, String operation, Hashtable parameters)
Constructs a ResourceRequest object with specified AccessClient object, resource type, name, operation and parameters name/value pair hashtable.ResourceRequest<wbr>(oracle.security.am.asdk.LocalAccessClient aClient, String resType, String resource, String operation, Hashtable parameters)
Constructs a ResourceRequest object with specified LocalAccessClient object, resource type, name, operation and parameters name/value pair hashtable. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Used to clone ResourceRequest Objects.Returns parameters required for authorization of the resource.int
Returns count of parameters required for authorization of the resource request object.Returns method configured for resource request object for example HTTP methods like GET, POST.Returns query parameters in the form of name/value pairs of String type.Returns resourceReturns resource typeReturns authentication scheme id used to protect the resourceboolean
Checks whether resource is protected.
-
Constructor Details
-
ResourceRequest
public ResourceRequest<wbr>(String resType, String resource, String operation) throws AccessExceptionConstructs a ResourceRequest object with specified resource type, name and operation.- Parameters:
resType
- Resource type, for example http, ejb etc. If null, defaults to httpresource
- Resource nameoperation
- operation for the resource object, for example GET, POST , PUT, HEAD, DELETE, TRACE, OPTIONS, CONNECT, OTHER.- Throws:
AccessException
- In case of errors during object creation or if resource or operation string is null
-
ResourceRequest
public ResourceRequest<wbr>(AccessClient aClient, String resType, String resource, String operation) throws AccessExceptionConstructs a ResourceRequest object with specified AccessClient object, resource type, name and operation.- Parameters:
aClient
- AccessClient object to be used for perfoming operations.resType
- Resource type, for example http, ejb etc. If null, defaults to httpresource
- Resource nameoperation
- operation for the resource object, for example GET, POST , PUT, HEAD, DELETE, TRACE, OPTIONS, CONNECT, OTHER.- Throws:
AccessException
- In case of errors during object creation or if resource or operation string is null
-
ResourceRequest
public ResourceRequest<wbr>(String resType, String resource, String operation, Hashtable parameters) throws AccessExceptionConstructs a ResourceRequest object with specified resource type, name, operation and parameters name/value pair hashtable.- Parameters:
resType
- Resource type, for example http, ejb etc., If null defaults to httpresource
- Resource nameoperation
- Operation for the resource object. For example GET, POST , PUT, HEAD, DELETE, TRACE, OPTIONS, CONNECT, OTHER.parameters
- (Optional) Hashtable of query string parameters in the form of name/value pairs of String type. These parameters will be used by the OAM server in order to determine the policy that protects this resource. This argument is optional if the policies configured does not rely on the query string parameters.- Throws:
AccessException
- In case of errors during object creation or if resource or operation string is null
-
ResourceRequest
public ResourceRequest<wbr>(AccessClient aClient, String resType, String resource, String operation, Hashtable parameters) throws AccessExceptionConstructs a ResourceRequest object with specified AccessClient object, resource type, name, operation and parameters name/value pair hashtable.- Parameters:
aClient
- AccessClient object to be used for perfoming operations.resType
- Resource type, for example http, ejb etc., If null defaults to httpresource
- Resource nameoperation
- Operation for the resource object. For example GET, POST , PUT, HEAD, DELETE, TRACE, OPTIONS, CONNECT, OTHER.parameters
- (Optional) Hashtable of query string parameters in the form of name/value pairs of String type. These parameters will be used by the OAM server in order to determine the policy that protects this resource. This argument is optional if the policies configured does not rely on the query string parameters.- Throws:
AccessException
- In case of errors during object creation or if resource or operation string is null
-
ResourceRequest
public ResourceRequest<wbr>(oracle.security.am.asdk.LocalAccessClient aClient, String resType, String resource, String operation, Hashtable parameters) throws AccessExceptionConstructs a ResourceRequest object with specified LocalAccessClient object, resource type, name, operation and parameters name/value pair hashtable.- Parameters:
aClient
- LocalAccessClient object to be used for perfoming operations.resType
- Resource type, for example http, ejb etc., If null defaults to httpresource
- Resource nameoperation
- Operation for the resource object. For example GET, POST , PUT, HEAD, DELETE, TRACE, OPTIONS, CONNECT, OTHER.parameters
- (Optional) Hashtable of query string parameters in the form of name/value pairs of String type. These parameters will be used by the OAM server in order to determine the policy that protects this resource. This argument is optional if the policies configured does not rely on the query string parameters.- Throws:
AccessException
- In case of errors during object creation or if resource or operation string is null
-
-
Method Details
-
isProtected
Checks whether resource is protected.- Returns:
- Boolean true if resource is protected.
- Throws:
AccessException
- In case server could not determine the protected status of the resource or some other error
-
getSchemeId
Returns authentication scheme id used to protect the resource- Returns:
- Authentication scheme id used to protect the resource
- Throws:
AccessException
- In case if resource request object is not initialized.
-
getResourceType
Returns resource type- Returns:
- String representing resource type
-
getResource
Returns resource- Returns:
- String representing the resource
-
getOperation
Returns method configured for resource request object for example HTTP methods like GET, POST.- Returns:
- Method configured for resource request object
-
getParameters
Returns query parameters in the form of name/value pairs of String type.- Returns:
- Hashtable of query string parameters in the form of name/value pairs of String type. It returns null value if query parameters were not passed while constructing ResourceRequest object.
-
getAuthorizationParameters
Returns parameters required for authorization of the resource. Parameters will be returned only if a authorization request fails with ERR_NEED_MORE_DATA error. This error indicates that additional information is required for authorization.- Returns:
- Hashtable containing parameters of String type required for authorization of the resource. It returns null if called before performing any authorization or if authorization for this resource has never failed with ERR_NEED_MORE_DATA error.
- Throws:
AccessException
- In case if it resource request object is not initialized.
-
getNumberOfAuthorizationParameters
Returns count of parameters required for authorization of the resource request object.- Returns:
- Count of parameters required for authorization of the resource. It returns 0 if there are no authorization parameters.
- Throws:
AccessException
- In case if resource request object is not initialized.
-
clone
Used to clone ResourceRequest Objects.- Throws:
CloneNotSupportedException
-