public class FSNameRegistrationHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected FSAccountFedInfo |
acctInfo |
protected com.sun.identity.federation.jaxb.entityconfig.BaseConfigType |
hostedConfig |
protected com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType |
hostedDescriptor |
protected String |
hostedEntityId |
protected String |
hostedProviderRole |
protected FSAccountManager |
managerInst |
protected String |
metaAlias |
protected FSAccountFedInfo |
newAcctInfo |
protected FSAccountFedInfoKey |
newAcctKey |
protected FSAccountFedInfoKey |
oldAcctKey |
protected String |
realm |
protected HashMap |
regisMap |
protected FSNameRegistrationRequest |
regisRequest |
protected FSNameRegistrationResponse |
regisResponse |
protected static String |
regisSource |
protected static String |
REGISTRATION_DONE_URL |
protected static String |
RELAY_STATE |
protected String |
relayState |
protected com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType |
remoteDescriptor |
protected String |
remoteEntityId |
protected javax.servlet.http.HttpServletRequest |
request |
protected javax.servlet.http.HttpServletResponse |
response |
protected HashMap |
returnMap |
protected static String |
returnURL |
protected Object |
ssoToken |
protected String |
userID |
Constructor and Description |
---|
FSNameRegistrationHandler()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
handleNameRegistration(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object ssoToken)
Initiates the name registration operation.
|
boolean |
handleNameRegistration(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object ssoToken,
HashMap valMap)
Handles the name registration after sso.
|
boolean |
handleRegistrationAfterFederation(String LRURL,
javax.servlet.http.HttpServletResponse response)
Does local name registration and initiates remote registration with the
IDP.
|
void |
processRegistrationRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
FSNameRegistrationRequest regisRequest)
Processes the registration request received from a
remote provider.
|
boolean |
processRegistrationResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
FSNameRegistrationResponse regisResponse)
Initiates the name registration operation.
|
FSNameRegistrationResponse |
processSOAPRegistrationRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
FSNameRegistrationRequest regisRequest)
Processes the name registration request received from a
remote provider.
|
void |
returnLocallyAtSource(javax.servlet.http.HttpServletResponse response,
boolean isSuccess)
Redirects to final destination after registration.
|
void |
setAccountInfo(FSAccountFedInfo acctInfo)
Sets the federation account information for the
user with a specific remote provider.
|
void |
setHostedDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType hostedDescriptor)
Sets hosted provider descriptor.
|
void |
setHostedDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig)
Sets hosted provider's extended meta.
|
void |
setHostedEntityId(String hostedId)
Sets hosted provider's entity ID.
|
void |
setHostedProviderRole(String hostedRole)
Sets hosted provider's role.
|
void |
setMetaAlias(String metaAlias)
Sets hosted provider's meta alias.
|
void |
setRealm(String realm)
Sets realm.
|
protected void |
setRegistrationURL()
Invoked to set some commonly used URLs based on hosted provider.
|
void |
setRemoteDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType remoteDescriptor)
Sets remote provider descriptor.
|
void |
setRemoteEntityId(String remoteId)
Sets remote provider's entity ID.
|
boolean |
setUserDN(FSNameRegistrationRequest regisRequest)
Determines the user based on the registration request received from
a remote provider.
|
void |
setUserID(String userID)
Sets the UserDN.
|
protected SOAPMessage |
signRegistrationRequest(SOAPMessage msg,
String idAttrName,
String id)
Signs the Name registration request before sending it to the IDP.
|
protected boolean |
verifyResponseSignature(SOAPMessage msg,
boolean isIDP)
Verifies the Name registration response received
from the IDP before processing locally.
|
protected javax.servlet.http.HttpServletResponse response
protected javax.servlet.http.HttpServletRequest request
protected HashMap regisMap
protected FSNameRegistrationResponse regisResponse
protected FSNameRegistrationRequest regisRequest
protected Object ssoToken
protected String userID
protected FSAccountFedInfo acctInfo
protected FSAccountFedInfo newAcctInfo
protected FSAccountFedInfoKey newAcctKey
protected FSAccountFedInfoKey oldAcctKey
protected com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType remoteDescriptor
protected com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType hostedDescriptor
protected com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig
protected String metaAlias
protected String relayState
protected FSAccountManager managerInst
protected static String REGISTRATION_DONE_URL
protected static final String RELAY_STATE
protected HashMap returnMap
protected static String returnURL
protected static String regisSource
protected String remoteEntityId
protected String realm
protected String hostedEntityId
protected String hostedProviderRole
public FSNameRegistrationHandler()
protected void setRegistrationURL()
public void setHostedDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType hostedDescriptor)
hostedDescriptor
- the Hosted provider Descriptorpublic void setHostedDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig)
hostedConfig
- hosted provider's extended meta.public void setHostedEntityId(String hostedId)
hostedId
- hosted provider's entity IDpublic void setHostedProviderRole(String hostedRole)
hostedRole
- hosted provider's rolepublic void setMetaAlias(String metaAlias)
metaAlias
- hosted provider's meta aliaspublic void setRealm(String realm)
realm
- The realm under which the entity resides.public void setRemoteEntityId(String remoteId)
remoteId
- remote provider's entity IDpublic void setRemoteDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType remoteDescriptor)
remoteDescriptor
- the Remote provider Descriptorpublic void setUserID(String userID)
userID
- the user who is initiatingpublic void setAccountInfo(FSAccountFedInfo acctInfo)
acctInfo
- the account fed info objectpublic boolean setUserDN(FSNameRegistrationRequest regisRequest)
regisRequest
- the name registration requesttrue
a user is found; false
otherwise.public boolean handleNameRegistration(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object ssoToken)
request
- HTTP requestresponse
- HTTP responsessoToken
- corresponding to the user's sessiontrue
if successful; false
otherwise.public boolean handleNameRegistration(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object ssoToken, HashMap valMap)
request
- HTTP requestresponse
- HTTP responsessoToken
- corresponding to the users's sessiontrue
if successful; false
otherwise.public boolean handleRegistrationAfterFederation(String LRURL, javax.servlet.http.HttpServletResponse response)
LRURL
- the final return URL after Name registration is completeresponse
- HTTP response objecttrue
if successful; false
otherwise.public boolean processRegistrationResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, FSNameRegistrationResponse regisResponse)
request
- HTTP requestresponse
- HTTP responseregisResponse
- FSNameRegistrationResponse
objecttrue
if the operation succeeds; false
otherwise.public void processRegistrationRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, FSNameRegistrationRequest regisRequest)
request
- HTTP requestresponse
- HTTP responseregisRequest
- the name registration request received from
remote providerpublic FSNameRegistrationResponse processSOAPRegistrationRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, FSNameRegistrationRequest regisRequest)
regisRequest
- the name registration request received from
remote providerpublic void returnLocallyAtSource(javax.servlet.http.HttpServletResponse response, boolean isSuccess)
response
- HttpServletResponse
objectisSuccess
- determines the content of the registration-done.jspprotected SOAPMessage signRegistrationRequest(SOAPMessage msg, String idAttrName, String id) throws SAMLException, FSMsgException
msg
- the request message to be sent to IDPidAttrName
- name of the id attribute to be signedid
- the value of the id attribute to be signedSAMLException,
- FSMsgException if error occurred.SAMLException
FSMsgException
protected boolean verifyResponseSignature(SOAPMessage msg, boolean isIDP)
msg
- the response messageisIDP
- whether the remote provider is an IDP or nottrue
if signature is valid; false
otherwise.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.