Package com.sun.identity.saml2.profile
Class DoManageNameID
- java.lang.Object
-
- com.sun.identity.saml2.profile.DoManageNameID
-
public class DoManageNameID extends Object
This class reads the query parameters and the required processing logic for sending ManageNameIDRequest from SP to IDP.
-
-
Constructor Summary
Constructors Constructor Description DoManageNameID()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ManageNameIDServiceElementgetIDPManageNameIDConfig(String realm, String entityId, String binding)Returns first ManageNameID configuration in an entity under the realm.static StringgetMNIBindingInfo(jakarta.servlet.http.HttpServletRequest request, String metaAlias, String hostEntityRole, String remoteEntityID)Returns binding information of MNI Service for remote entity from request or meta configuration.static ManageNameIDServiceElementgetSPManageNameIDConfig(String realm, String entityId, String binding)Returns first ManageNameID configuration in an entity under the realm.static voidinitiateManageNameIDRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String metaAlias, String remoteEntityID, Map paramsMap)Parses the request parameters and builds the ManageNameID Request to sent to remote Entity.static voidprocessHttpRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap)Parses the request parameters and process the ManageNameID Request from the remote entity.static booleanprocessManageNameIDResponse(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap)Parses the request parameters and builds the Authentication Request to sent to the IDP.static booleanprocessMNIResponsePOST(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap)static voidprocessPOSTRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap)static voidprocessSOAPRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap)Parses the request parameters and process the ManageNameID Request from the remote entity.static voidsignMNIRequest(String certAlias, ManageNameIDRequest mniRequest)
-
-
-
Method Detail
-
initiateManageNameIDRequest
public static void initiateManageNameIDRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String metaAlias, String remoteEntityID, Map paramsMap) throws SAML2ExceptionParses the request parameters and builds the ManageNameID Request to sent to remote Entity.- Parameters:
request- the HttpServletRequest.response- the HttpServletResponse.metaAlias- entityID of hosted entity.remoteEntityID- entityID of remote entity.paramsMap- Map of all other parameters.- Throws:
SAML2Exception- if error initiating request to remote entity.
-
getMNIBindingInfo
public static String getMNIBindingInfo(jakarta.servlet.http.HttpServletRequest request, String metaAlias, String hostEntityRole, String remoteEntityID) throws SAML2Exception
Returns binding information of MNI Service for remote entity from request or meta configuration.- Parameters:
request- the HttpServletRequest.metaAlias- entityID of hosted entity.hostEntityRole- Role of hosted entity.remoteEntityID- entityID of remote entity.- Returns:
- return true if the processing is successful.
- Throws:
SAML2Exception- if no binding information is configured.
-
processHttpRequest
public static void processHttpRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap) throws SAML2Exception, SessionException, jakarta.servlet.ServletExceptionParses the request parameters and process the ManageNameID Request from the remote entity.- Parameters:
request- the HttpServletRequest.response- the HttpServletResponse.paramsMap- Map of all other parameters.- Throws:
SAML2Exception- if error occurred while processing the request.SessionException- if error processing the request from remote entity.jakarta.servlet.ServletException- if request length is invalid.
-
processSOAPRequest
public static void processSOAPRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap) throws SAML2Exception, IOException, jakarta.xml.soap.SOAPException, jakarta.servlet.ServletExceptionParses the request parameters and process the ManageNameID Request from the remote entity.- Parameters:
request- the HttpServletRequest.response- the HttpServletResponse.paramsMap- Map of all other parameters.- Throws:
SAML2Exception- if error occurred while processing the request.IOException- if error generation DOM from input stream.jakarta.xml.soap.SOAPException- if error generating soap message.jakarta.servlet.ServletException- if request length is invalid.
-
processManageNameIDResponse
public static boolean processManageNameIDResponse(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap) throws SAML2ExceptionParses the request parameters and builds the Authentication Request to sent to the IDP.- Parameters:
request- the HttpServletRequest.response- the HttpServletResponse.paramsMap- Map of all other parameters.- Returns:
- return true if the processing is successful.
- Throws:
SAML2Exception- if error initiating request to IDP.
-
getIDPManageNameIDConfig
public static ManageNameIDServiceElement getIDPManageNameIDConfig(String realm, String entityId, String binding) throws SAML2MetaException, SessionException
Returns first ManageNameID configuration in an entity under the realm.- Parameters:
realm- The realm under which the entity resides.entityId- ID of the entity to be retrieved.binding- bind type need to has to be matched.- Returns:
ManageNameIDServiceElementfor the entity or null- Throws:
SAML2MetaException- if unable to retrieve the first identity provider's SSO configuration.SessionException- invalid or expired single-sign-on session
-
getSPManageNameIDConfig
public static ManageNameIDServiceElement getSPManageNameIDConfig(String realm, String entityId, String binding) throws SAML2MetaException, SessionException
Returns first ManageNameID configuration in an entity under the realm.- Parameters:
realm- The realm under which the entity resides.entityId- ID of the entity to be retrieved.binding- bind type need to has to be matched.- Returns:
ManageNameIDServiceElementfor the entity or null- Throws:
SAML2MetaException- if unable to retrieve the first identity provider's SSO configuration.SessionException- invalid or expired single-sign-on session.
-
signMNIRequest
public static void signMNIRequest(String certAlias, ManageNameIDRequest mniRequest) throws SAML2Exception
- Throws:
SAML2Exception
-
processPOSTRequest
public static void processPOSTRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap) throws SAML2Exception, IOException, jakarta.xml.soap.SOAPException, SessionException, jakarta.servlet.ServletException- Throws:
SAML2ExceptionIOExceptionjakarta.xml.soap.SOAPExceptionSessionExceptionjakarta.servlet.ServletException
-
processMNIResponsePOST
public static boolean processMNIResponsePOST(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map paramsMap) throws SAML2Exception- Throws:
SAML2Exception
-
-