public class MultiProtocolUtils extends Object
MultiProtocolUtils
class provides some utility methods.Modifier and Type | Method and Description |
---|---|
static void |
addFederationProtocol(Object session,
String protocol)
Updates session property (
SingleLogoutManager.FEDERATION_PROTOCOLS
) with the new protocol information. |
static String |
geServerBaseURL(javax.servlet.http.HttpServletRequest request)
Returns base URL for the server, the URL contains the protocol, server
name, server port and deployment URI.
|
static String |
getLogoutStatus(int status)
Returns logout status in string form.
|
static void |
invalidateSession(Object session,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String protocol)
Invalidates session for a specific protocol.
|
static boolean |
isMultipleProtocolSession(javax.servlet.http.HttpServletRequest request,
String protocol)
Returns true if the session is used in other federation protocols.
|
static boolean |
isMultipleProtocolSession(Object session,
String protocol)
Returns true if the session is used in other federation protocols.
|
static boolean |
isMultiProtocolRelayState(String relayState)
Returns true if the relay state if one of the
URL for
the multi-federation protocol processing. |
static void |
removeFederationProtocol(Object session,
String protocol)
Updates session property (
SingleLogoutManager.FEDERATION_PROTOCOLS
) with the new protocol information. |
static boolean |
usedInProtocol(javax.servlet.http.HttpServletRequest request,
String protocol)
Returns true if the session is used in the specified federation protocol.
|
static boolean |
usedInProtocol(Object session,
String protocol)
Returns true if the session is used in the specified federation protocol.
|
public static String geServerBaseURL(javax.servlet.http.HttpServletRequest request)
request
- HttpServlet request object.public static boolean isMultiProtocolRelayState(String relayState)
URL
for
the multi-federation protocol processing.relayState
- relay state to be checked.URL
.public static void addFederationProtocol(Object session, String protocol)
SingleLogoutManager.FEDERATION_PROTOCOLS
) with the new protocol information.session
- Session Object to be updatedprotocol
- Name of the Federation protocol to be added.public static void removeFederationProtocol(Object session, String protocol)
SingleLogoutManager.FEDERATION_PROTOCOLS
) with the new protocol information.session
- Session Object to be updatedprotocol
- Name of the Federation protocol to be added.public static boolean isMultipleProtocolSession(javax.servlet.http.HttpServletRequest request, String protocol)
request
- HttpServlet objectprotocol
- Protocol of the caller. Value is one of the following:
SingleLogoutManager.IDFF
SingleLogoutManager.SAML2
SingleLogoutManager.WS_FED
public static boolean isMultipleProtocolSession(Object session, String protocol)
session
- Session objectprotocol
- Protocol of the caller. Value is one of the following:
SingleLogoutManager.IDFF
SingleLogoutManager.SAML2
SingleLogoutManager.WS_FED
public static boolean usedInProtocol(javax.servlet.http.HttpServletRequest request, String protocol)
request
- HttpServlet objectprotocol
- Protocol of the caller. Value is one of the following:
SingleLogoutManager.IDFF
SingleLogoutManager.SAML2
SingleLogoutManager.WS_FED
public static boolean usedInProtocol(Object session, String protocol)
session
- Session objectprotocol
- Protocol of the caller. Value is one of the following:
SingleLogoutManager.IDFF
SingleLogoutManager.SAML2
SingleLogoutManager.WS_FED
public static void invalidateSession(Object session, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String protocol) throws SessionException
session
- the session object to be invalidated.request
- HttpServletRequest object.response
- HttpServletResponse object.protocol
- the federaion protocol to be checked.SessionException
public static String getLogoutStatus(int status)
status
- Single Logout Status. Possible values:
LOGOUT_SUCCEEDED_STATUS
- single logout succeeded.
LOGOUT_FAILED_STATUS
- single logout failed.
LOGOUT_PARTIAL_STATUS
- single logout partially
succeeded.
LOGOUT_REDIRECTED_STATUS
- single logout request
redirected.
LOGOUT_NO_ACTION_STATUS
- single loglout not
performed.IFSConstants.LOGOUT_SUCCESS,
IFSConstants.LOGOUT_FAILURE
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.