Results 1 to 1 of 1

Thread: A basic Spring Security usage scenario: integrating with application user login/logou

  1. #1

    Default A basic Spring Security usage scenario: integrating with application user login/logou

    I have a user login mechanism in place. And a user can have one or more roles based on my understanding of the Role definition within Spring Security.
    Code:
    public class User {
    
    	public static String USER = "ROLE_USER", ADMIN ="ROLE_ADMIN";
    ...
    	private Set<String> roles = new HashSet<String>();
    
    	private String password;
    	
    	private String userName;
    ...
    	public void addRole(String role) {
    		roles.add(role);
    	}
    ...
    }
    My question is how to integrate my application login/logout mechanism with Spring Security? I have looked through those samples linked to the sample and tutorial page and haven't seen a related sample.

    Do I miss something for this basic case?
    Last edited by vw729; Nov 30th, 2009 at 01:54 PM.
    [URL="http://vicina.info"] 新闻,社区新闻,分类广告

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •