Home > Back-end >  Spring Security in how to create their own login page for different roles
Spring Security in how to create their own login page for different roles

Time:10-01

I want to know, if I have a user and a role ROLE_USER ROLE_ADMIN role of users, I want to create a login page for each, how to implement in the spring security?

CodePudding user response:

You can use the security permissions TAB page, you need to specify the permissions role can access

CodePudding user response:

I am using springboot2.2.5, could you tell me how to get, don't use XML configuration should be and I can demand is exist multiple login page at the same time it

CodePudding user response:

Not before landing is no role,
No role, then how do you judge according to the character?

CodePudding user response:

Same as above, in the case of not login: how do you know what is the user role?
This does not solve what you can achieve,,

CodePudding user response:

_ datang ssangyong reference 4 floor response:
again, in the case of not login: how do you know what is the user role?
Not achieve them, do what you like this does not solve,
a few days before I found a solution is in a security configuration class for each login page to configure a security inner classes, and through the @ Order the annotations to load Order, according to the path to select the login page

CodePudding user response:

reference 5 floor qq_39019208 reply:
Quote: refer to 4th floor _ datang ssangyong's reply:

Same as above, in the case of not login: how do you know what is the user role?
Not achieve them, do what you like this does not solve,
a few days before I found a solution is in a security configuration class for each login page to configure a security inner classes, and through the @ Order the annotations to load Order, according to the path to select the login page


You can say how he internal implementation?
Assume that the same computer, two people to use, a login URL,
Computer how is that one click URL, and then judge his role orientation to different landing pages?

CodePudding user response:

refer to 6th floor _ datang ssangyong's reply:
Quote: refer to the fifth floor qq_39019208 reply:

Quote: refer to 4th floor _ datang ssangyong's reply:

Same as above, in the case of not login: how do you know what is the user role?
Not achieve them, do what you like this does not solve,
a few days before I found a solution is in a security configuration class for each login page to configure a security inner classes, and through the @ Order the annotations to load Order, according to the path to select the login page


You can say how he internal implementation?
Assume that the same computer, two people to use, a login URL,
Computer how is that one click URL, and then judge his role orientation to different landing pages?
I'll give you a connection, you have a look at https://blog.csdn.net/qq_22771739/article/details/84328333

CodePudding user response:

Extension AuthenticationEntryPoint

CodePudding user response:

refer to the eighth floor _ _ the ups and downs reply:
extension AuthenticationEntryPoint
this interface is abnormal consumption
  • Related