Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.ide.webbrowser
Class WOCAuthenticator

java.lang.Object
  extended by oracle.ide.webbrowser.WOCAuthenticator

public final class WOCAuthenticator
extends java.lang.Object

A service API that can authenticate Oracle Web Accounts.

The logIn(PasswordAuthentication) method attempts to authenticate to an authentication URL. By default, it uses the standard profile.oracle.com authentication handler. However, you can specify a different authentication server url using setAuthenticationServerUrl(URL).

If authentication is successful, logIn(PasswordAuthentication) returns an WOCAuthenticator.AuthenticationToken. This opaque token can be passed in to the endorse(URLConnection,AuthenticationToken) API to include authentication credentials with any subsequent URL connection.

Since:
11.0

Nested Class Summary
static class WOCAuthenticator.AuthenticationToken
          An opaque authentication token.
 
Constructor Summary
WOCAuthenticator()
           
 
Method Summary
static void endorse(java.net.URLConnection conn, WOCAuthenticator.AuthenticationToken token)
          Endorse the specified URL connection with authentication information.
 java.net.PasswordAuthentication getRememberedAuthentication()
          Retrieve a remembered authentication from preferences.
 WOCAuthenticator.AuthenticationToken logIn(java.net.PasswordAuthentication credentials)
          Attempt to log in to an Oracle Web Account.
 void setAuthenticationServerUrl(java.net.URL url)
          Sets the URL to use for authentication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WOCAuthenticator

public WOCAuthenticator()
Method Detail

setAuthenticationServerUrl

public void setAuthenticationServerUrl(java.net.URL url)
Sets the URL to use for authentication. By default, this is the standard login handler URL on profile.oracle.com.

Parameters:
url - the URL of the server to use for authentication. Must not be null.

getRememberedAuthentication

public java.net.PasswordAuthentication getRememberedAuthentication()
Retrieve a remembered authentication from preferences. This method will return null if the user has chosen not to store authentication preferences. Normally, you should use the OTNAuthPanel to prompt for a PasswordAuthentication if:

Returns:
an authentication from preferences, or null.

logIn

public WOCAuthenticator.AuthenticationToken logIn(java.net.PasswordAuthentication credentials)
                                           throws java.io.IOException
Attempt to log in to an Oracle Web Account.

Parameters:
credentials - the user name and password to authenticate with. Must not be null.
Returns:
an authentication token if authentication was successful, or null if authentication was unsuccessful. This token may be passed into #endorse( HttpURLConnection, AuthenticationToken ).
Throws:
java.io.IOException

endorse

public static void endorse(java.net.URLConnection conn,
                           WOCAuthenticator.AuthenticationToken token)
Endorse the specified URL connection with authentication information.

Parameters:
conn - a connection to endorse with connection information. Must not be null.
token - an authentication token, must not be null.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

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