actuate.getUserID() returns null after authenticated using JSAPI - authenticate
Comments
-
<p>Are you using single sign-on? Or passing in null into authenticate()?</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='http://developer.actuate.com/be/documentation/ManualsIHUB31/actuate-api-reference.pdf'>http://developer.actuate.com/be/documentation/ManualsIHUB31/actuate-api-reference.pdf</a></p>
<p style="margin-left:40px;"> </p>
<p style="margin-left:40px;"><em>Returns the user name of the logged-in user that was supplied to authenticate().<br>
<br>
If single sign-on is used and login occurs without passing credentials to authenticate( ), this method returns null or an empty string.</em></p>
<p style="margin-left:40px;"> </p>
<p>
If it is not behaving as expected, please log a case with Support.</p>
Warning No formatter is installed for the format ipb0 -
<p>null is expected for SSO. For security, the JSAPI login servlet only returns success or failure, and sets a JSESSIONID cookie. No username or other user information is transmitted over the wire.</p>
<p> </p>
<p>Wouldn't your existing app that first authenticated before the JSAPI authenicate() know the username?</p>
<p> </p>
<p>A colleague provided a workaround if you truly needed to get the username. </p>
<p> </p>
<p>1. Create a JSP under /iportal. This page will return a JSON string of the logged in username.</p>
<pre class="_prettyXprint">
<%@ page language="java" contentType="application/json" pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.Arrays" %>
<%@ page import="javax.json.*" %>
<jsp:useBean
id="userinfobean"
class="com.actuate.activeportal.beans.UserInfoBean"
scope="session"/>
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", -1);
String user = userinfobean.getUserid();
out.println("{user: '" + user + "'}");
%>
</pre>
<p>2. From your application, make an AJAX call to the JSP page to retrieve the username.</p>Warning No formatter is installed for the format ipb1 -
<p>In the app as a part of login mechanism, authenticate() method is used for login. From then on, all the call to reporting server are made with null value for username and password.</p>
<p> </p>
<p>I meant Single sign on this aspect and not the implementation in another application.</p>
<p> </p>
<p>It was quite informative on other use cases scenario mentioned above. Thanks!</p>
0 -
0
Categories
- All Categories
- 124 Developer Announcements
- 54 Articles
- 156 General Questions
- 155 Thrust Services
- 56 Developer Hackathon
- 38 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9.1K Extended ECM
- 920 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 34 eDOCS
- 195 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 11 XM Fax
- Follow Categories