what is a SubjectTemplate?
a subject template is the template used to check if a user wich try to register in an application by providing some personal informations provide the right informations(also knwon as credentials). SubjectTemplate defines 4 credential sets:- private required credentials
- public required credentials
- private optional credentials
- public optional credentials
- visibility (private/public) : private implies that a permission is required to access to private credentials
- requirement level (required/optional): required implies that the registration will fail if one or more credentials required are missing in the credentials provided by the 'candidate' user.
How to grab the DefaultSubjectTemplate?
if the AuthenticationManager is defined, you can get it with the AuthenticationManagerFactory class with its static method getAuthenticationManager. the AuthenticationManager interface provide the getDefaultSubjectTemplate method to grab it.AuthenticationManager currentAuthNManager = AuthenticationManagerFactory.getAuthenticationManager(); SubjectTemplate st = currentAuthNManager.getDefaultSubjectTemplate(); //candidate is built with informations sent by the user SubjectTemplate candidate; st.validateUser(candidate);
Version 1.8 last modified by Charles Gay on 17/01/2007 at 00:45
Document data
Attachments:
No attachments for this document
Comments: 0