Application design for login and then dashboard display - api-design

I am new to spring boot, the application has separate frontend and backend and they communicate with REST.
I have a requirement to create login authentication on the backend. The application after login is complete should display the dashboard.
I need to know how can I make the work flow.
I have a simple LoginController class which calls the LoginService to get user entered credentials, then I want to redirect user to dashboard of the application. How can I implement this.
I can write the code, I just need the design.

Related

Pass parameter from application to custom B2C policy claim

I have a Timer, that manages Blazor application session time. After it expires, application redirects me to login page.
The login page is implemented via B2C custom policies and as far as I know it is configurable with claims.
Is it possible to somehow pass a parameter from application to claim in order to then customize UI of the login page?
I am using MsalAuthentication for authentication in my app.

Change user in testing time

I want to change or switch user in asp.net web application at time of automation testing. As there is no login page. The web application directly take user id from OS using (user.identification) and send to third party application and that send all the details of user like that user get login into web app.
Any one can tell me how change or switch user when do testing using protractor?

Integrating SSO with an Application with Native Authentication

I have been tasked with integrating single-sign-on for an existing application, so I've been working on a couple of demos. The first one was the standard demo for Spring Security and I got that working. Now I'm trying to do a proof-of-concept demo where I created a toy version of the application in question with only two screens: one for login, and one to display some information about the user that logged in. I want to integrate SSO with this application so that the user has two ways to be authenticated: either by entering credentials directly in the login screen or by a SSO SAML request...
So I copied over SAML libraries and configurations from the standard SSO demo into my proof-of-concept application, and I seem to have SSO working, albeit a bit too well, in that I'm no longer able to get to my login screen, i.e., I still want that to be the default behaviour for someone entering the base URL for the application. How do I have to configure my application to achieve this?
The way I solved the problem was by changing the Spring Security configuration so that instead of using the generic /** to require SSO authentication for most pages of the application, it nows only requires such authentication for a single HTML page, sso.htm. This "page" is really translated by the application as a request to a controller that handles the application-specific processing for an SSO request. The initial page for the application, redirect.jsp, now contains some logic to pick which page a user should be redirected to, based on whether he or she got to that page directly (i.e., by typing in the default URL for the application) or via a SAML message from a trusted identity provider.
Note: For this to work, the initial page cannot be designated in the Spring Security configuration as either a secured or unsecured page. If it were secured, then this page could only be accessed after an SSO authentication, so a user would be thwarted from doing a non-SSO login. If unsecured, then the security context would not be accessible from that page, so the page logic would be unable to determine if the user in question has SAML credentials and an SSO authentication request for the application could never be fulfilled.
Once the user has been authenticated, either by credentials entered in the login screen or by an SSO request, from that point on, the application's continuing authentication of that user to view its pages is the same, i.e., no further SSO authentication is done. But when the user logs off from the application (or is logged off due to a session timeout), a check is made then to see if SSO authentication was done for this user. If so, then in addition to being logged out from the application, a local SSO logout is also done for the user, i.e., the SSO authentication session for the application is terminated, but the user remains logged in with his or her identity provider. So such a user could log back into the application in question, either directly via the application's login screen or by having the identity provider issue a new SAML message.
Hope this helps someone else...

How to use the same user login on app and website with Firebase

I have a web application which uses Firebase authentication and in some cases user is redirected to a website (hosting) that uses the same proccess for authentication.
My doubt is: is there a way to use the same user login from app to website? Because now, user has to authenticate twice, on app and website and it's not good for their experience.
Thanks in advance!
This is an idea:
Make that redirect parts a WebView and then pass data from the app to the web view.
Ithe web view uses that data. You can put the user token here and authenticate in that way.

ASP.NET MVC 4 Web API Authorization

I am working on locking down various sections of an internal application's web api controller actions. Currently, we are using Windows Authentication and a custom role provider. When making ajax calls to the API, I would like to prevent the credentials prompt from showing up when the current user is not authorized to access the given api method. We have a custom authorization filter for our MVC controller actions (NOT WEBAPI), but am not having much luck in preventing that prompt from showing up when making AJAX calls to a webapi action.
Is it possible to just deny/grant access via an authorize attribute and prevent that annoying login prompt from showing up?

Resources