@Test public void shouldNotBeAuthenticatedWhenTheUnderlyingAuthenticationIsNotAuthenticated() { when(authentication.isAuthenticated()).thenReturn(false); OAuth2AuthorizationContext ctx = new OAuth2AuthorizationContext(); assertThat(ctx.isAuthenticated()).isFalse(); }
public boolean isAuthenticated() { OAuth2Authentication oauth = oauth2Authentication(); return oauth == null ? false : oauth.isAuthenticated(); }
OAuth2AuthorizationContext implements AuthorizationContextProvider { public boolean isAuthenticated() { OAuth2Authentication oauth = oauth2Authentication(); return oauth == null ? false : oauth.isAuthenticated(); } }
OAuth2AuthorizationContext implements AuthorizationContextProvider { public boolean isAuthenticated() { OAuth2Authentication oauth = oauth2Authentication(); return oauth == null ? false : oauth.isAuthenticated(); } OAuth2AuthorizationContext(); }
OAuth2AuthorizationContext implements AuthorizationContextProvider { public boolean isAuthenticated() { OAuth2Authentication oauth = oauth2Authentication(); return oauth == null ? false : oauth.isAuthenticated(); } OAuth2AuthorizationContext(); boolean isAuthenticated(); Set<String> getScopes(); Set<String> getAuthorities(); Set<String> getRoles(); String getUsername(); }
OAuth2AuthorizationContext implements AuthorizationContextProvider { public boolean isAuthenticated() { OAuth2Authentication oauth = oauth2Authentication(); return oauth == null ? false : oauth.isAuthenticated(); } OAuth2AuthorizationContext(); boolean isAuthenticated(); Set<String> getScopes(); Set<String> getAuthorities(); Set<String> getRoles(); String getUsername();  }