repository.grepcode.com$java$root@jdk$openjdk@6-b14
repository.grepcode.com$java$root@jdk$openjdk@6-b14@java$security$Principal.java
file
oh
o
[]
I'm using j_security_check on a login.jsp. The server is GlassFish Server 3. It all works, when the user is authenticated it then opens index.jsp. My problem is I need to get j_username in my index.jsp, but I couldn't find a way of doing it. All solutions I found are in Java and I need something that works with my jsp.
Any ideas? Thank you very much in advance!
I'm developing a webservice in Java on a stack of Metro and Tomcat, and my problem is with the user authentication. I understand Tomcat can make use of several external authentication realms, such as JDBCRealm or JNDIRealm, and I want my endusers to configure their Tomcat installation for their respective realm.
Now, what I need in my webservice-methods is the user name (or id, something uniqu...
I want to store the the user's ID in a session variable to use across the application. I don't see how I'd do that with the default security feature? It authenticates itself and I don't know (if) there is a callback function or something? That we can use to do our house-keeping
Any help is deeply appreciated
I have implemented UserDetailsServce, it returns an instance of MyUser (which implements UserDetails)
public MyUser loadUserByUsername(String arg0)
I now want to access my custom getters/fields on MyUSer in my jsp pages, so far I got this:
${pageContext.request.userPrincipal.name}
But that only allows access to a Principal object, how can I access MyUser object
I'm running Glassfish 3.0 and I'm implementing JDBCRealm for login authentication. The username and roles are saved in a table called usertable. The authentication is working as expected.
But the problem is now when the user logs in, how can I retrieve the username of the logged in user in the application?
PS: I'm implementing JSF page and Managed Bean
This interface represents the abstract notion of a principal, which
can be used to represent any entity, such as an individual, a
corporation, and a login id.
Compares this principal to the specified object. Returns true
if the object passed in matches the principal represented by
the implementation of this interface.
- Parameters:
another principal to compare with.- Returns:
- true if the principal passed in is the same as that
encapsulated by this principal, and false otherwise.
Returns a string representation of this principal.
- Returns:
- a string representation of this principal.
Returns a hashcode for this principal.
- Returns:
- a hashcode for this principal.
Returns the name of this principal.
- Returns:
- the name of this principal.