Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v1.http
Class URLAuthHandler

    oracle.portal.provider.v1.http.URLAuthHandler

public class URLAuthHandler

URLAuthHandler serves the purpose of authorization handler for specific URL Based portlet contexts. As an extension to the DefaultAuthHandler, it provides couple of more methods to add and remove context specific authorizations. Currently implementation is limited to 'basic' mode of authentication.

Constructor Summary
`URLAuthHandler()`

Method Summary
`static void` | `addAuthorization(java.lang.Object context, HTTPClient.NVPair login)` Adds login user/password object to the password store in a thread safe manner.
`HTTPClient.AuthorizationInfo` | `fixupAuthInfo(HTTPClient.AuthorizationInfo authorizationinfo, HTTPClient.RoRequest rorequest, HTTPClient.AuthorizationInfo authorizationinfo1, HTTPClient.RoResponse roresponse)`
`HTTPClient.AuthorizationInfo` | `getAuthorization(HTTPClient.AuthorizationInfo challenge, HTTPClient.RoRequest req, HTTPClient.RoResponse resp)` This method is called whenever a 401 or 407 response is received and no candidate info is found in the list of known auth info.
`void` | `handleAuthHeaders(HTTPClient.Response response, HTTPClient.RoRequest rorequest, HTTPClient.AuthorizationInfo authorizationinfo, HTTPClient.AuthorizationInfo authorizationinfo1)`
`void` | `handleAuthTrailers(HTTPClient.Response response, HTTPClient.RoRequest rorequest, HTTPClient.AuthorizationInfo authorizationinfo, HTTPClient.AuthorizationInfo authorizationinfo1)`
`static void` | `removeAuthorization(java.lang.Object context)` Removes Login information specific to the give context, from password store and removes authorization information from HTTPClient's AuthorizationModule as well.

Constructor Detail

### URLAuthHandler

    public URLAuthHandler()

Method Detail

### addAuthorization

    public static void addAuthorization(java.lang.Object context,
                                        HTTPClient.NVPair login)

  Adds login user/password object to the password store in a thread safe manner.
  Parameters:
    `context` - Object acting as a context for the login information.
    `login` - Name value pair containing user name/password.

### removeAuthorization

    public static void removeAuthorization(java.lang.Object context)

  Removes Login information specific to the give context, from password store and removes authorization information from HTTPClient's AuthorizationModule as well.
  Parameters:
    `context` - Object acting as a context for the login information.

### getAuthorization

    public HTTPClient.AuthorizationInfo getAuthorization(HTTPClient.AuthorizationInfo challenge,
                                                         HTTPClient.RoRequest req,
                                                         HTTPClient.RoResponse resp)
                                                  throws HTTPClient.AuthSchemeNotImplException

  This method is called whenever a 401 or 407 response is received and no candidate info is found in the list of known auth info. Usually this method will query the user for the necessary info. If the returned info is not null it will be added to the list of known info. If the info is valid for more than one (host, port, realm, scheme) tuple then this method must add the corresponding auth infos itself.
  Parameters:
    `challenge` - - the parsed challenge from the server; the host, port, scheme, realm
    `req` - - the request which provoked this response.
    `resp` - - the full response.
  Returns:
    the authorization info to use when retrying the request, or null if the request is not to be retried. The necessary info includes the host, port, scheme and realm as given in the challenge parameter, plus either the basic cookie or any necessary params.

### fixupAuthInfo

    public HTTPClient.AuthorizationInfo fixupAuthInfo(HTTPClient.AuthorizationInfo authorizationinfo,
                                                      HTTPClient.RoRequest rorequest,
                                                      HTTPClient.AuthorizationInfo authorizationinfo1,
                                                      HTTPClient.RoResponse roresponse)
                                               throws HTTPClient.AuthSchemeNotImplException

### handleAuthHeaders

    public void handleAuthHeaders(HTTPClient.Response response,
                                  HTTPClient.RoRequest rorequest,
                                  HTTPClient.AuthorizationInfo authorizationinfo,
                                  HTTPClient.AuthorizationInfo authorizationinfo1)
                           throws java.io.IOException

### handleAuthTrailers

    public void handleAuthTrailers(HTTPClient.Response response,
                                   HTTPClient.RoRequest rorequest,
                                   HTTPClient.AuthorizationInfo authorizationinfo,
                                   HTTPClient.AuthorizationInfo authorizationinfo1)
                            throws java.io.IOException

Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD