|
@@ -35,7 +35,7 @@ public class UsernamePasswordAuthenticationTokenTests {
|
|
public void authenticatedPropertyContractIsSatisfied() {
|
|
public void authenticatedPropertyContractIsSatisfied() {
|
|
UsernamePasswordAuthenticationToken grantedToken = UsernamePasswordAuthenticationToken.authenticated("Test",
|
|
UsernamePasswordAuthenticationToken grantedToken = UsernamePasswordAuthenticationToken.authenticated("Test",
|
|
"Password", AuthorityUtils.NO_AUTHORITIES);
|
|
"Password", AuthorityUtils.NO_AUTHORITIES);
|
|
- // check default given we passed some GrantedAuthorty[]s (well, we passed empty
|
|
|
|
|
|
+ // check default given we passed some GrantedAuthority[]s (well, we passed empty
|
|
// list)
|
|
// list)
|
|
assertThat(grantedToken.isAuthenticated()).isTrue();
|
|
assertThat(grantedToken.isAuthenticated()).isTrue();
|
|
// check explicit set to untrusted (we can safely go from trusted to untrusted,
|
|
// check explicit set to untrusted (we can safely go from trusted to untrusted,
|
|
@@ -43,7 +43,7 @@ public class UsernamePasswordAuthenticationTokenTests {
|
|
grantedToken.setAuthenticated(false);
|
|
grantedToken.setAuthenticated(false);
|
|
assertThat(!grantedToken.isAuthenticated()).isTrue();
|
|
assertThat(!grantedToken.isAuthenticated()).isTrue();
|
|
// Now let's create a UsernamePasswordAuthenticationToken without any
|
|
// Now let's create a UsernamePasswordAuthenticationToken without any
|
|
- // GrantedAuthorty[]s (different constructor)
|
|
|
|
|
|
+ // GrantedAuthority[]s (different constructor)
|
|
UsernamePasswordAuthenticationToken noneGrantedToken = UsernamePasswordAuthenticationToken
|
|
UsernamePasswordAuthenticationToken noneGrantedToken = UsernamePasswordAuthenticationToken
|
|
.unauthenticated("Test", "Password");
|
|
.unauthenticated("Test", "Password");
|
|
assertThat(!noneGrantedToken.isAuthenticated()).isTrue();
|
|
assertThat(!noneGrantedToken.isAuthenticated()).isTrue();
|