| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.pollex.pam.business.config.AppProperties; |
| | | import com.pollex.pam.business.domain.TokenBlackList; |
| | | import com.pollex.pam.business.repository.TokenBlackListRepository; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | TokenBlackListRepository tokenBlackListRepository; |
| | | |
| | | @Autowired |
| | | AppProperties applicationProperties; |
| | | |
| | | public TokenProvider(JHipsterProperties jHipsterProperties) { |
| | | byte[] keyBytes; |
| | |
| | | .filter(auth -> !auth.trim().isEmpty()) |
| | | .map(SimpleGrantedAuthority::new) |
| | | .collect(Collectors.toList()); |
| | | |
| | | User principal = new User(claims.getSubject(), "", authorities); |
| | | User principal = new User(claims.getSubject(), applicationProperties.getDefaultPaxxword(), authorities); |
| | | UsernamePasswordAuthenticationToken authInfo = new UsernamePasswordAuthenticationToken(principal, token, authorities); |
| | | authInfo.setDetails(claims.get(AUTHORITIES_DETAILS)); |
| | | |