Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
1921 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Is there a way to get the logged in user using API? (Any class that provides sup
Mahesh Sanga
over 10 years ago
Is there a way to get the logged in user using API? (Any class that provides support to get the logged in user)...
OriginalPostID-112708
OriginalPostID-112708
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Is there any reason why the out of the box loggedinuser() function can't be used in this case?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mahesh Sanga
over 10 years ago
In one of my servlet plugin I am using
ServiceContext sc = ServiceContextFactory.getServiceContext("userName");
this servlet is invoked from external system. So I want to get the context of the logged in user rather than passing the userName! If this is not the better approach please suggest the best way to get the UserContext ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
ServiceContext sc = WebServiceContextFactory.getServiceContext(req);
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
As you can see you can build a service context from the HttpServletRequest
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mahesh Sanga
over 10 years ago
Thanks Eduardo!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel