34 lines
1.3 KiB
Java
34 lines
1.3 KiB
Java
package +zoccolo+.web.authentication;
|
|
|
|
import java.util.Collection;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.dao.DataAccessException;
|
|
import org.springframework.security.authentication.AuthenticationProvider;
|
|
import org.springframework.security.authentication.BadCredentialsException;
|
|
import org.springframework.security.core.Authentication;
|
|
import org.springframework.security.core.AuthenticationException;
|
|
import org.springframework.security.core.GrantedAuthority;
|
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import +zoccolo+.web.authentication.+userpass+UsernamePasswordAuthenticationToken;
|
|
import +zoccolo+.web.authentication.authority.UserAuthorityUtils;
|
|
import +domain+.screwdriver.+dsname+.+dbschema+.+tabuser+;
|
|
import +zoccolo+.+rail+.dao.I+Rail++tabuser+Dao;
|
|
|
|
/** Autenticazione */
|
|
@Component
|
|
public class +Applicaz+UserAuthenticationProvider
|
|
implements AuthenticationProvider {
|
|
|
|
private I+Rail++tabuser+Dao<+tabuser+> +rail++tabuser+;
|
|
|
|
@Autowired
|
|
public +Applicaz+UserAuthenticationProvider(I+Rail++tabuser+Dao<+tabuser+> +rail++tabuser+) {
|
|
if (+rail++tabuser+ == null) {
|
|
throw new IllegalArgumentException(
|
|
"Screwdriver: +rail++tabuser+ cannot be null");
|
|
}
|
|
this.+rail++tabuser+ = +rail++tabuser+;
|
|
} |