|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Realm
A common set of services all realms must implement.
| Method Summary | |
|---|---|
String |
allowOrigin()
The script's origins that are permitted to send requests to this realm as defined in the HTTP header Access-Control-Allow-Origin. |
Object |
authenticateRequest(String method,
Object resource,
Map<String,String[]> request)
Authentucates a request to determine the authenticated credential. |
org.apache.http.HttpMessage |
authenticationInfo(String method,
Object resource,
Map<String,String[]> request)
Response headers that should be included in the response. |
boolean |
authorizeCredential(Object credential,
String method,
Object resource,
Map<String,String[]> request)
Called after a request has been authenticate. |
org.apache.http.HttpResponse |
forbidden(String method,
Object resource,
Map<String,String[]> request)
The response that should be returned when the request is authenticated, but could not be authorised or the request originated from an invalid origin. |
String |
protectionDomain()
The set of URL prefixes that this realm protects. |
org.apache.http.HttpResponse |
unauthorized(String method,
Object resource,
Map<String,String[]> request)
The response that should be returned when the request could not be authenticated. |
boolean |
withAgentCredentials(String origin)
If scripts from the given origin can use their agent's credentials. |
| Method Detail |
|---|
String protectionDomain()
String allowOrigin()
boolean withAgentCredentials(String origin)
origin - the scheme and authority the agent script was loaded from
true if credentials from the agent are permitted in
a request.
Object authenticateRequest(String method,
Object resource,
Map<String,String[]> request)
throws RepositoryException
method - The HTTP request method.resource - The target resource of a request.request - A map with "request-target" that was used in the request line,
"content-md5" that is the base64 of 128 bit MD5 digest as per
RFC1864 if a request body was sent, "authorization" that is
the HTTP request header of the same name if present, "origin"
that is the scheme and authority the agent script was loaded
from (if applicable), and "via" that is a list of hosts or
pseudonym and their HTTP version that sent or forwarded this
request.
RepositoryException
org.apache.http.HttpResponse unauthorized(String method,
Object resource,
Map<String,String[]> request)
throws Exception
method - The HTTP request method.resource - The target resource of a request.request - A map with "request-target" that was used in the request line,
"authorization" that is the HTTP request header of the same
name if present, "origin" that is the scheme and authority the
agent script was loaded from (if applicable), and "via" that
is a list of hosts or pseudonym and their HTTP version that
sent or forwarded this request.
Exception
boolean authorizeCredential(Object credential,
String method,
Object resource,
Map<String,String[]> request)
credential - Response from authenticateAgent or authenticateRequest.method - The HTTP request method.resource - The target resource of a request.request - A map with "request-target" that was used in the request line,
"authorization" that is the HTTP request header of the same
name if present, "origin" that is the scheme and authority the
agent script was loaded from (if applicable), and "via" that
is a list of hosts or pseudonym and their HTTP version that
sent or forwarded this request.
true if the credentials are authorized on this
resource
org.apache.http.HttpResponse forbidden(String method,
Object resource,
Map<String,String[]> request)
throws Exception
method - The HTTP request method.resource - The target resource of a request.request - A map with "request-target" that was used in the request line,
"authorization" that is the HTTP request header of the same
name if present, "origin" that is the scheme and authority the
agent script was loaded from (if applicable), and "via" that
is a list of hosts or pseudonym and their HTTP version that
sent or forwarded this request.
Exception
org.apache.http.HttpMessage authenticationInfo(String method,
Object resource,
Map<String,String[]> request)
method - The HTTP request method.resource - The target resource of a request.request - A map with "request-target" that was used in the request line,
"authorization" that is the HTTP request header of the same
name if present, "origin" that is the scheme and authority the
agent script was loaded from (if applicable), and "via" that
is a list of hosts or pseudonym and their HTTP version that
sent or forwarded this request.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||