public abstract class FSSSOAndFedHandler extends Object
IDP
side handler that handles single sign on
and federation requests.Modifier and Type | Field and Description |
---|---|
protected FSAccountManager |
accountManager |
protected FSAuthnRequest |
authnRequest |
protected com.sun.identity.federation.jaxb.entityconfig.BaseConfigType |
hostedConfig |
protected com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType |
hostedDesc |
protected String |
hostedEntityId |
protected String |
metaAlias |
protected static IDFFMetaManager |
metaManager |
protected Status |
noFedStatus |
protected String |
realm |
protected String |
relayState |
protected javax.servlet.http.HttpServletRequest |
request |
protected javax.servlet.http.HttpServletResponse |
response |
protected com.sun.identity.federation.jaxb.entityconfig.BaseConfigType |
spConfig |
protected com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType |
spDescriptor |
protected String |
spEntityId |
protected Object |
ssoToken |
Modifier | Constructor and Description |
---|---|
protected |
FSSSOAndFedHandler()
Default constructor.
|
|
FSSSOAndFedHandler(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Constructor.
|
|
FSSSOAndFedHandler(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
FSAuthnRequest authnRequest,
com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType spDescriptor,
com.sun.identity.federation.jaxb.entityconfig.BaseConfigType spConfig,
String spEntityId,
String relayState)
Constructor.
|
|
FSSSOAndFedHandler(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
FSAuthnRequest authnRequest,
com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType spDescriptor,
com.sun.identity.federation.jaxb.entityconfig.BaseConfigType spConfig,
String spEntityId,
String relayState,
Object ssoToken)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static String |
cleanMetaAlias(javax.servlet.http.HttpServletRequest request)
Removes meta alias from request parameters.
|
protected FSAuthnResponse |
createAuthnResponse(Object ssoToken,
String inResponseTo,
NameIdentifier userHandle,
NameIdentifier idpHandle) |
protected FSAccountFedInfo |
doAccountFederation(Object ssoToken,
FSAuthnRequest authnRequest,
FSSession session) |
protected boolean |
doSingleSignOn(Object ssoToken,
String inResponseTo) |
protected boolean |
doSingleSignOn(Object ssoToken,
String inResponseTo,
NameIdentifier spHandle,
NameIdentifier idpHandle) |
String |
formatLoginURL(String loginUrl,
String authnContext)
Generates local login url.
|
String |
getHostedEntityId()
Gets hosted provider id.
|
com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType |
getProvider()
Returns remote
SP provider descriptor. |
String |
getRealm()
Gets the realm under which the entity resides.
|
protected boolean |
isIDPProxyEnabled(FSAuthnRequest authnRequest)
Checks if the identity provider is configured for proxying the
authentication requests for a requesting service provider.
|
void |
processAuthnRequest(FSAuthnRequest authnRequest,
boolean bPostAuthn)
Processes authentication request.
|
boolean |
processPostAuthnSSO(FSAuthnRequest authnRequest)
Handles authentication request after local login.
|
boolean |
processPreAuthnSSO(FSAuthnRequest authnRequest)
Handles authentication request.
|
FSResponse |
processSAMLRequest(FSSAMLRequest samlRequest)
Processes
SAML request. |
protected void |
returnErrorResponse() |
protected void |
sendAuthnResponse(FSAuthnResponse authnResponse) |
protected void |
sendProxyAuthnRequest(FSAuthnRequest authnRequest,
String preferredIDP)
Sends a new AuthnRequest to the authenticating provider.
|
void |
setHostedDescriptor(com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType hostedDesc)
Sets host identity provider's meta descriptor.
|
void |
setHostedDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig)
Sets host identity provider's extended meta.
|
void |
setHostedEntityId(String hostedEntityId)
Sets host identity provider's entity ID.
|
void |
setMetaAlias(String metaAlias)
Sets meta alias of the host identity provider.
|
void |
setRealm(String realm)
Sets the realm under which the entity resides.
|
void |
setSPDescriptor(com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType spDescriptor)
Sets remote
SP provider descriptor. |
protected boolean |
verifyRequestSignature(FSAuthnRequest authnRequest) |
protected static IDFFMetaManager metaManager
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
protected com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType spDescriptor
protected com.sun.identity.federation.jaxb.entityconfig.BaseConfigType spConfig
protected String spEntityId
protected String relayState
protected FSAuthnRequest authnRequest
protected Object ssoToken
protected String metaAlias
protected com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType hostedDesc
protected com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig
protected String realm
protected String hostedEntityId
protected Status noFedStatus
protected FSAccountManager accountManager
protected FSSSOAndFedHandler()
public FSSSOAndFedHandler(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, FSAuthnRequest authnRequest, com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType spDescriptor, com.sun.identity.federation.jaxb.entityconfig.BaseConfigType spConfig, String spEntityId, String relayState, Object ssoToken)
request
- HttpServletRequest
objectresponse
- HttpServletResponse
objectauthnRequest
- authentication requestspDescriptor
- SP
's provider descriptorspConfig
- SP
's provider extended metaspEntityId
- SP
's entity idrelayState
- where to go after single sign on is donessoToken
- token of the user to be single sign-onedpublic FSSSOAndFedHandler(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, FSAuthnRequest authnRequest, com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType spDescriptor, com.sun.identity.federation.jaxb.entityconfig.BaseConfigType spConfig, String spEntityId, String relayState)
request
- HttpServletRequest
objectresponse
- HttpServletResponse
objectauthnRequest
- authentication requestspDescriptor
- SP
's provider descriptorspConfig
- SP
's extended metaspEntityId
- SP
's entity idrelayState
- where to go after single sign on is donepublic FSSSOAndFedHandler(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- HttpServletRequest
objectresponse
- HttpServletResponse
objectpublic void setMetaAlias(String metaAlias)
metaAlias
- meta alias of the provider.public void setHostedEntityId(String hostedEntityId)
hostedEntityId
- entity ID to be setgetHostedEntityId()
public void setHostedDescriptor(com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType hostedDesc)
hostedDesc
- hosted meta descriptor to be setpublic void setHostedDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostedConfig)
hostedConfig
- host identity provider's extended meta to be setpublic String getHostedEntityId()
setHostedEntityId(String)
public String getRealm()
setRealm(String)
public void setRealm(String realm)
realm
- The realm under which the entity resides.getRealm()
public boolean processPreAuthnSSO(FSAuthnRequest authnRequest)
authnRequest
- FSAuthnRequest
objecttrue
if the request is handled successfully;
false
otherwise.public String formatLoginURL(String loginUrl, String authnContext)
loginUrl
- authentication base urlauthnContext
- requested AuthnContextRef
public boolean processPostAuthnSSO(FSAuthnRequest authnRequest)
authnRequest
- FSAuthnRequest
objecttrue
if the request is handled successfully;
false
otherwise.protected FSAuthnResponse createAuthnResponse(Object ssoToken, String inResponseTo, NameIdentifier userHandle, NameIdentifier idpHandle)
protected boolean doSingleSignOn(Object ssoToken, String inResponseTo, NameIdentifier spHandle, NameIdentifier idpHandle)
protected FSAccountFedInfo doAccountFederation(Object ssoToken, FSAuthnRequest authnRequest, FSSession session)
protected void returnErrorResponse()
public FSResponse processSAMLRequest(FSSAMLRequest samlRequest)
SAML
request.samlRequest
- FSSAMLRequest
objectFSResponse
objectpublic void processAuthnRequest(FSAuthnRequest authnRequest, boolean bPostAuthn)
authnRequest
- authentication requestbPostAuthn
- true
indicates it's post authentication;
false
indicates it's pre authentication.protected void sendAuthnResponse(FSAuthnResponse authnResponse)
public void setSPDescriptor(com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType spDescriptor)
SP
provider descriptor.spDescriptor
- remote SP
provider descriptor.getProvider()
public com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType getProvider()
SP
provider descriptor.SP
provider descriptorprotected boolean verifyRequestSignature(FSAuthnRequest authnRequest)
public static String cleanMetaAlias(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest
objectprotected void sendProxyAuthnRequest(FSAuthnRequest authnRequest, String preferredIDP) throws FSException, IOException
authnRequest
- original AuthnRequest sent by the service provider.preferredIDP
- IDP to be proxied.FSException
- for any federation failure.IOException
- if there is a failure in redirection.protected boolean isIDPProxyEnabled(FSAuthnRequest authnRequest) throws FSException
authnRequest
- Authentication Request.true
if the IDP is configured for proxying.FSException
- for any failure.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.