Class OAM11GWebgateAuthHandler
java.lang.Object
oracle.stellent.ridc.protocol.http.auth.OAM11GWebgateAuthHandler
- All Implemented Interfaces:
AuthenticationHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected ServiceLogstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RIDCHttpClientprotected StringgetLogId()protected ServiceLogprotected voidWith redirects enabled, HTTP GET the PING_SERVER service fronted by the OHS hosting the 11g Webgate (/cs/idcplg?IdcService=PING_SERVER&IsJava=1) ...static booleanhasOAM11gWebGateCookie(RIDCHttpClient httpClient) booleanisAuthSupported(RIDCHttpClient httpClient, RIDCHttpMethod pingMethod) Determine if 11g Webgate authentication is in the mix.intSend the authenticated request to the Content ServervoidsetHttpClient(RIDCHttpClient httpClient) protected voidprotected voidsetServiceLog(ServiceLog log) protected void
-
Field Details
-
m_serviceLog
-
m_logId
-
OAM_11G_WEBGATE_COOKIE_PREFIX
- See Also:
-
OAM_11G_WEBGATE_COOKIE2_PREFIX
- See Also:
-
-
Constructor Details
-
OAM11GWebgateAuthHandler
Constructor- Parameters:
httpProtocol-
-
-
Method Details
-
getHttpProtocol
-
setLogId
-
setServiceLog
-
getServiceLog
-
getLogId
-
isAuthSupported
public boolean isAuthSupported(RIDCHttpClient httpClient, RIDCHttpMethod pingMethod) throws ProtocolException Determine if 11g Webgate authentication is in the mix.- Specified by:
isAuthSupportedin interfaceAuthenticationHandler- Parameters:
httpClient- httpclient instance created by AuthenticationDetectorpingMethod- ping method invoked by AuthenticationDetector- Returns:
- true if the handler can support the requests to the given server
- Throws:
ProtocolException
-
hasOAM11gWebGateCookie
-
getAuthScheme
- Specified by:
getAuthSchemein interfaceAuthenticationHandler- Returns:
- the authentication scheme associated with this handler
-
sendAuthenticatedRequest
Description copied from interface:AuthenticationHandlerSend the authenticated request to the Content Server- Specified by:
sendAuthenticatedRequestin interfaceAuthenticationHandler- Returns:
- the http status
- Throws:
ProtocolException
-
handleLogin
With redirects enabled, HTTP GET the PING_SERVER service fronted by the OHS hosting the 11g Webgate (/cs/idcplg?IdcService=PING_SERVER&IsJava=1) ... we will be redirected to /adfAuthentication?login=true which is an OAM protected resource. ... and redirected again to the OAM server: http://oamserver:port/oam/server/obrareq.cgi?encquery%XXXXX ... a HTML login page will then render containing an important request_id hidden input form parameter. We must then HTTP POST the OAM server /oam/server/auth_cred_submit with post data containing userid, password, request_id (ensuring previous cookies obtained are sent) ... if authentication is successful, we will receive an OAM_ID (oam server session cookie) and be redirected back to the webserver hosting the 11g webgate /obrar.cgi?encreply=YYYY ... an "OAMAuthnCookie_<host>:<port>" is then set (where <host:port> is the name/port of the web server hosting the 11g webgate) and we are then redirected to /adfAuthentication?login=true the redirect to /adfAuthentication?login=true establishes the JSESSIONID and (_WL_AUTHCOOKIE_JSESSIONID if a secure HTTPS connection was leveraged) we are then redirected back to the original PING_SERVER service call which should return a HDA response stating the user is logged in as ZZZ- Throws:
ProtocolException
-
getHttpClient
- Throws:
ProtocolException
-
createHttpClient
- Throws:
ProtocolException
-
setHttpClient
-
throwFailedAuthenticationException
protected void throwFailedAuthenticationException(RIDCHttpMethod method) throws ProtocolException, URISyntaxException - Throws:
ProtocolExceptionURISyntaxException
-