Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-03


oracle.adf.model.connection.url
Class ChallengeAuthentication

java.lang.Object
  extended by oracle.adf.model.connection.url.ChallengeAuthentication

All Implemented Interfaces:
AuthenticationScheme

public class ChallengeAuthentication
extends java.lang.Object
implements AuthenticationScheme

ChallengeAuthentication provides Basic / Digest variants of simple username password authentication for the URLConnection.

The Default variant is BASIC Authentication as configured in metadata. The variant is decided when the ChallengeAuthentication is instantiated. ChallengeAuthentication(String realm, boolean useDigest). A value of true for the useDigest param will enable Digest authentication.

Since:
10.1.3
See Also:
AuthenticationScheme

Field Summary
static java.lang.String PASSWORD
           
static java.lang.String USERNAME
           

 

Fields inherited from interface oracle.adf.model.connection.url.AuthenticationScheme
ATTR_PROVIDER, AUTHENTICATION

 

Constructor Summary
ChallengeAuthentication(Node description)
          Instantiate this ChallengeAuthentication Scheme from the persisted metadata.
ChallengeAuthentication(java.lang.String realm, boolean useDigest)
          Set the authorization information on this connection.

 

Method Summary
 void authenticate(HTTPClient.HTTPConnection conn)
          Authenticate the HTTPConnection instance using this authentication scheme.
 void authenticate(java.lang.String host, int port)
          Enforce challange authentication for a particular host/port
 Node describe()
          Describe this Authentication scheme.
 java.util.Map getCredentials()
          Fetch the credentials represented by the scheme.
 java.lang.String getRealm()
          Gets the realm
 boolean isDigest()
           
 void loadCredentials(java.util.Map environment)
          Load the Authentication Scheme with credentials from Credential store.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

USERNAME

public static final java.lang.String USERNAME
See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
See Also:
Constant Field Values

Constructor Detail

ChallengeAuthentication

public ChallengeAuthentication(java.lang.String realm,
                               boolean useDigest)
Set the authorization information on this connection. The supported modes are basic and digest authorization. User credentials needed for authorization will be feteched from the credential store
Parameters:
relam - The authorization realm .
digestAuth - Indicates the mode of authorization. if true indicates that DIGEST authentication should be done. if false BASIC authentication is done.

ChallengeAuthentication

public ChallengeAuthentication(Node description)
                        throws ConnectionException
Instantiate this ChallengeAuthentication Scheme from the persisted metadata.
Parameters:
description - Node describing this Challange Authentication scheme.
Throws:
{@link - ConnectionException} if there was an error in reading the description provided to initiaize the authentication scheme.
ConnectionException

Method Detail

loadCredentials

public void loadCredentials(java.util.Map environment)
Load the Authentication Scheme with credentials from Credential store. The Map represents the environment that has the security configuration passed by the Connection Manager which contains the credential properties that this scheme defines.
Specified by:
loadCredentials in interface AuthenticationScheme
Parameters:
environment - The environment that has the credential properties defined by this scheme.

getCredentials

public java.util.Map getCredentials()
Fetch the credentials represented by the scheme. The connection May query the credentials when saving the credentials to the Credential Store
Specified by:
getCredentials in interface AuthenticationScheme
Returns:
Map representing the connection credentials

getRealm

public java.lang.String getRealm()
Gets the realm

isDigest

public boolean isDigest()

describe

public Node describe()
Describe this Authentication scheme. The description is saved for a connection instance as a part of the connection metdata. This description is used to reconstruct this authentication scheme.
Specified by:
describe in interface AuthenticationScheme
Returns:
The Node describing this authentication scheme.

authenticate

public void authenticate(HTTPClient.HTTPConnection conn)
                  throws ConnectionException
Authenticate the HTTPConnection instance using this authentication scheme. Set the necessary authorization headers into the HTTPConnection instance.
Specified by:
authenticate in interface AuthenticationScheme
Parameters:
conn - The HTTPConnection instance that represents the interaction for the URLConnection
Throws:
{@link - ConnectionException} If the authentication fails.
ConnectionException

authenticate

public void authenticate(java.lang.String host,
                         int port)
                  throws ConnectionException
Enforce challange authentication for a particular host/port
Specified by:
authenticate in interface AuthenticationScheme
Parameters:
host - The Host for which the authentication is to be done
port - The related port for which authentication is to be done
Throws:
{@link - ConnectionException} if there was failure or error when authenticating.
ConnectionException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-03


Copyright © 1997, 2009, Oracle. All rights reserved.