cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Error 401and SSO

Former Member
0 Kudos

Dear all,

I finally got a custom 401 error message to wort, but it broke the SSO. I always get redirected to our custom 401 error page.

Does anyone knows how to fix ?

KR

Quentin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I´m also trying to catch the following Exeption :com.sap.security.core.server.jaas.spnego.SPNegoProtocolException

but it is never catched

any idea ?

Quentin

Former Member
0 Kudos

Found it (about the 401 page).

Here is my JSP code (You´ll have to remove the space around the script TAG )

 
<%@page import="java.util.*"%>
<%@page import = "java.io.*" %>
<%@page import = "java.net.*" %>
<%@page import = "com.sap.security.api.IUser" %>
<%@page import = "com.sap.security.api.UMFactory" %>
<%@page import = "com.sap.security.api.UMException" %>
<%@page import = "com.sap.security.api.IUserMaint" %>
<%@page isErrorPage="true" %>
<%
	String ticket = request.getHeader("Authorization");
%>
<html>
<head>
<title>401 Error</title>
</head>
<body>
< script >
//If we stay on the 401 page redirect to another page like a test access page
window.location.href = "/Test_Access_page.jsp";
< /script >
</body>
</html>
<%
//Ask for kerberos ticket
if (ticket == null) {
		response.setStatus(response.SC_UNAUTHORIZED);
		response.setHeader("WWW-Authenticate", "Negotiate");
		response.flushBuffer();
		return;
	}
%>