In my websphere portal 8 I need to redirect user to custom page after session timeout.
As was described in all tutorials I set
redirect.logout = true
redirect.logout.url = /wps/portal/uec/uechidden/sessiontimeout
in WP_ConfigService but that had no effect.
I have check all access permissions to redirect page and portlet and other.
Also I have Logout filter in my app, but even when I removed it I've been redirected to "Your portal session has timed out because of no activity. Please start a new session at your portal Home."
My timeout settings are set for server not for one application.
Any suggestions?
To redirect to the login page (or any other page) when the session expires, use one of the following methods:
Option 1.
Extend the authentication filter chain and implement the desired logic in code. Refer to the following articles for more information: "Configuring authentication filters" and " New security APIs in WebSphere Portal".
Option 2:
Modify the ErrorSessionTimeOut jsp to add Java script to redirect to the login page when the session times out. This option is simpler to implement but you may see a momentary "flash" when the redirect occurs.
More information: http://www-01.ibm.com/support/docview.wss?uid=swg21419230
To redirect the user to custom page after session times out, you need to perform following steps.
Define ImplicitLogoutFilter by implementing com.ibm.portal.auth.ImplicitLogoutFilter.
While defining ImplicitLogoutFilter, set the the redirect url in filterChainContext using method:
filterChainContext.setRedirectURL("URL of custom page where user should be redirected to");
Configure this filter in web sphere.
In WP_ConfigService, create a new custom property redirect.logout=true
Restart the server.
Follow these steps, it works when session times out and user try to view authenticated page. In case any issue is faced, please let me know. I'll help you in resolving this issue..
Related
I am using React with Django Rest Framework as backend with proper permissions. I am using token authentication and axios to make queries to the django api. Firstly, I can do a login with credentials in my React interface, and I store access token in the local storage. After about 5 minutes, if I make a new query I get an error from django telling me "access deny". I can catch that kind of error and send the user to the login page again. But here I have two questions:
1- What should I do to refresh access token whereas the user is working? I have refresh token but I do not know what to do.
2- If I get rid of the first problem. I want the application goes automatically to login page after 5 minutes without any user activity. I mean, I want to go to login page without the need of an explicit click on all the possible options. Some kind of background query to django to detect expiration, so that I can redirect to login page.
Thank you in advanced.
Context
I'm developing a browser application that uses msal.js library to allow Azure Active Directory accounts to access our website. The application has the clientId and the scopes properly set and it uses loginRedirect and acquireTokenSilent successfully.
Problem
The issue I'm facing is that I'm unable to keep the session open because I don't see the Keep Me Signed In message (KMSI) so I can not answer 'YES' and make the AADSSO cookie persistent. For that reason after the login process, if the browser is closed I need to log in again.
Expectation
If I'm redirected to microsoft login from my website using msal.js library, I expect to see the KMSI message to enable persistent session (which for some reason I can see if I go directly to login.microsoftonline.com)
Sorry for the spanish: It says Do you want to keep the session open? No / Yes
Question
How can I enable KMSI with msal.js ?
The cause of not seeing 'Keep me signed in' login message when using msal.js is because when the library builds the URL to perform the login, it contains a query string item called x-client-Ver that changes the microsoftonline.com login flow.
If you remove that item from the URL (&x-client-Ver=1.1.3 for example), you can see the 'Keep me signed in' message.
The solution is to manually patch the library removing this until Microsoft fixes it. Like that: https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/982/commits
Currently developing a SSO method for my Drupal website. I've installed simplesamlphp successfully and also configured it. I have also installed the simplesaml_auth module on my website and the SSO procedure works fine. The only problem I am having is when a user logs in via the SSO method I need to redirect them to a certain page when login is successful and I am not sure where to edit the code to be able to do this.
Any help is welcome.
Thanks!
You can add redirect condition wise in below function of simplesaml auth module
simplesamlphp_auth_loginpage() {
change drupal_goto path here to set new redirect.
}
Add a destination menu item id query parameter in the SAML login url to which it should b redirected after successful login.
Generally the SAML menu item is saml_login which makes the SAML login url like https://[SITE_NAME]/saml_login now just add it a destination query parameter like https://[SITE_NAME]/saml_login/?destination=after_login
Where after_login should be a custom menu_item defined in any of the custom module containing the callback function for redirection.
If needed any existing menu item of core or contributed module can be also used in the destination.
I'm migrating from Identity Server 3 and I have a question regarding controlling what page is redirected when we need to redirect from the authorize endpoint into the account controller.
The current solution using the PreAuthenticateAsync method on the UserService to look for a custom acr_value key/value in combination with prompt=login on the authorize request.
An example use case is allowing a deep link into the Register page, or into the Manage profile page if the user is logged in.
I cannot find a simple hook for controlling where we go after IDSrvr4 detects a login redirect.
I have found the IAuthorizeInteractionResponseGenerator interface and was wondering if a custom implementation ( or override the default behaviour of one of the ProcessXXXAsync methods from IdentityServer4.ResponseHandling.AuthorizeInteractionResponseGenerator ) is appropriate, but this feels like a sledgehammer approach.
The QuickStart scenario #6 from the IdSrv github repo is a close example of what I want to accomplish if you tried redirect to Register, or the Manage controller if logged in
Thanks in advance
You can configure the page you want to go to for unauthenticated users like this:
services.AddIdentityServer(options => options.UserInteraction.LoginUrl = "/account/login");
For sending authenticated users back to that page you need to to implement IAuthorizeInteractionResponseGenerator - or rather derive from the default one.
Is there a way to open external URL in new window and keep an watch over URL change in newly open window and take actions accordingly. And i want to get cookies values also from newly open window.Basically I'm developing website in angularjs. To signup or login i'm using social media. For example on clicking facebook button(using passportjs for social login ) it should redirect user to facebook login screen and once login is successful user will be redirected to a page where i'll be sending access and refresh token in cookies from my server once redirect is done. So i want to keep watch over URL and redirect user to profile page once redirecting is done and want to fetch value from cookies.
new window -> no rootScope or any other scope.
You don't have the same "runtine environment" cross windows
You can't control a new window with the one that open it.
You have to "boot" another angualr and passing parameters, if needed in another way.
UPDATE
normally with 3th party authentication you can choose the page that you want to land.
For angularjs I found the lib satellizer that is pretty good and give you support for all the principal identity provider(facebook, twitter, guthub ecc).
Take a look and tell me if is what are you searching