Skip navigation links

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

E10653-06


oracle.adf.model.connection.url
Interface AuthenticationScheme

All Known Implementing Classes:
ChallengeAuthentication

public interface AuthenticationScheme

The AuthenticationScheme descibes an interface for providing authentication support to URLConnection.

Extensions to the authentication scheme must

Every authentication scheme must describe itself as a Node to allow the scheme to be persisted with the connection metadata. Refer describe(). When the connection is loaded by the Connection manager, the connection reconstructs the authentication scheme from the metadata provided by describe(). A custom AuthenticationScheme must set the provider attribute when describing its metdata. The provider defines the implementing class of the custom authentication scheme. for e.g. <authentication provider="foo.myCustomAuthScheme" > < .................... > </authentication>

Authentication implementations can then be provided by defining the authenticate(HTTPConnection con) and authenticate(String host, int port) Two variants are provided, so that custom headers can be set on the HTTPConnection instance, as well as provide authentication for a particular host/port pair.

Since:
10.1.3

Field Summary
static java.lang.String ATTR_PROVIDER
          provider attribute in the metdata description.
static java.lang.String AUTHENTICATION
          authentication element in the metdata description.

 

Method Summary
 void authenticate(HTTPClient.HTTPConnection conn)
          Authenticate the URLConnection interaction instance using this authentication scheme.
 void authenticate(java.lang.String host, int port)
          Authenticate a Host/Port instance using this authentication scheme.
 Node describe()
          Describe this authentication scheme.
 java.util.Map getCredentials()
          Fetch the credentials represented by the scheme.
 void loadCredentials(java.util.Map environment)
          Load the Authentication Scheme with credentials from Credential store.

 

Field Detail

AUTHENTICATION

static final java.lang.String AUTHENTICATION
authentication element in the metdata description.
See Also:
Constant Field Values

ATTR_PROVIDER

static final java.lang.String ATTR_PROVIDER
provider attribute in the metdata description.
See Also:
Constant Field Values

Method Detail

describe

Node describe()
              throws ConnectionException
Describe this authentication scheme. The description of this scheme will be stored along with the connection metadata. When the connection is recreated at runtime. This description is used to instantiate the authentication scheme for the connection instance
Returns:
The Node describing the Authentication scheme.
Throws:
{@link - ConnectionException} if the scheme could not be described.
ConnectionException

loadCredentials

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.
Parameters:
environment - The environment that has the credential properties defined by this scheme.

getCredentials

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
Returns:
Map representing the connection credentials

authenticate

void authenticate(HTTPClient.HTTPConnection conn)
                  throws ConnectionException
Authenticate the URLConnection interaction instance using this authentication scheme. This is invoked when the URLConnection intializes the interaction during the start up of the underlying communication channel to the resource.
Parameters:
conn - The HTTPConnection instance for which the necessary authentication headers need to be set when the URLConnection is prepared for use.
Throws:
{@link - ConnectionException} If the authentication fails or an error occurs trying to authenticate.
ConnectionException

authenticate

void authenticate(java.lang.String host,
                  int port)
                  throws ConnectionException
Authenticate a Host/Port instance using this authentication scheme.
Parameters:
host - The Host for which authentication is needed.
port - The port for which authentication is needed.
Throws:
{@link - ConnectionException} If the authentication fails or an error occurs trying to authenticate.
ConnectionException

Skip navigation links

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

E10653-06


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