cancel
Showing results for 
Search instead for 
Did you mean: 

Set of custom cookies with OWD (SSO, LTPA)

walle
Champ in-the-making
Champ in-the-making
hi,

we need to set some custom cookie in OWD after login - we need this for our SSO/LTPA environment…
This cookies should contain some data that are required by our environment.
Is there something available in you OpenWorkdesk framework, is it configurable or how/where can we extend this.

We also want to try it, by setting a session variable after login… the same way like the cookie…

Thanks for help,
best regards
1 REPLY 1

chfi
Champ in-the-making
Champ in-the-making
Hi,

you should overrride the method
"public void onLogin(HttpServletRequest request_p)"
in the class
"OwIBMCMLoginUISubModule.java"
==> afterwards you have to retrieve the "HttpResponse" and create the cookie with the information you want to provide, e.g. the username, timestamp or something else.

Here is the sample code you requested:

————————————————————————
//override this method
    public void onLogin(HttpServletRequest request_p) throws Exception
    {
        super.onLogin(request_p);
   //set the cookie after the login was executed by the super method
        Cookie userCookie = new Cookie("MyNewCookie", request_p.getParameter(NAME));
        userCookie.setPath("/");
        getContext().getHttpResponse().addCookie(userCookie);
     }
————————————————————————

Let me know if you face any issues.

Bye
chfi
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.