webidor/src/main/java/cz/xelfi/quoridor/webidor/UserDetailsImpl.java
changeset 35 2e85dd878f04
parent 34 34baf57f2d4e
child 36 d5ccf73ebbe5
     1.1 --- a/webidor/src/main/java/cz/xelfi/quoridor/webidor/UserDetailsImpl.java	Sun Jul 12 13:35:58 2009 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,53 +0,0 @@
     1.4 -/*
     1.5 - * To change this template, choose Tools | Templates
     1.6 - * and open the template in the editor.
     1.7 - */
     1.8 -
     1.9 -package cz.xelfi.quoridor.webidor;
    1.10 -
    1.11 -import org.springframework.dao.DataAccessException;
    1.12 -import org.springframework.security.GrantedAuthority;
    1.13 -import org.springframework.security.GrantedAuthorityImpl;
    1.14 -import org.springframework.security.userdetails.UserDetails;
    1.15 -import org.springframework.security.userdetails.UserDetailsService;
    1.16 -import org.springframework.security.userdetails.UsernameNotFoundException;
    1.17 -
    1.18 -/**
    1.19 - *
    1.20 - * @author Jaroslav Tulach <jtulach@netbeans.org>
    1.21 - */
    1.22 -public class UserDetailsImpl implements UserDetailsService {
    1.23 -
    1.24 -    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
    1.25 -        return new UserDetails() {
    1.26 -            public GrantedAuthority[] getAuthorities() {
    1.27 -                return new GrantedAuthority[] { new GrantedAuthorityImpl("ROLE_USER") };
    1.28 -            }
    1.29 -
    1.30 -            public String getPassword() {
    1.31 -                return "ok";
    1.32 -            }
    1.33 -
    1.34 -            public String getUsername() {
    1.35 -                return "jarda";
    1.36 -            }
    1.37 -
    1.38 -            public boolean isAccountNonExpired() {
    1.39 -                return true;
    1.40 -            }
    1.41 -
    1.42 -            public boolean isAccountNonLocked() {
    1.43 -                return true;
    1.44 -            }
    1.45 -
    1.46 -            public boolean isCredentialsNonExpired() {
    1.47 -                return true;
    1.48 -            }
    1.49 -
    1.50 -            public boolean isEnabled() {
    1.51 -                return true;
    1.52 -            }
    1.53 -        };
    1.54 -    }
    1.55 -
    1.56 -}