Add UsernamePasswordAuthenticationToken factory methods
- unauthenticated factory method - authenticated factory method - test for unauthenticated factory method - test for authenticated factory method - make existing constructor protected - use newly factory methods in rest of the project - update copyright dates Closes gh-10790
This commit is contained in:
committed by
Josh Cummings
parent
d2f24ae5f5
commit
ac9c29b2a0
@@ -137,7 +137,7 @@ You can see an example of how it might be used below:
|
||||
----
|
||||
SecurityContext context = SecurityContextHolder.createEmptyContext();
|
||||
Authentication authentication =
|
||||
new UsernamePasswordAuthenticationToken("user","doesnotmatter", AuthorityUtils.createAuthorityList("ROLE_USER"));
|
||||
UsernamePasswordAuthenticationToken.authenticated("user","doesnotmatter", AuthorityUtils.createAuthorityList("ROLE_USER"));
|
||||
context.setAuthentication(authentication);
|
||||
|
||||
SimpleAsyncTaskExecutor delegateExecutor =
|
||||
|
||||
Reference in New Issue
Block a user