@Test void getTokenRealm() { assertThat(securityDetailsService.getTokenRealm(), is(TEST3_REALM)); SecurityContextHolder.getContext().setAuthentication(null); assertNull(securityDetailsService.getTokenRealm()); }
@Override public String getTokenRealm() { Authentication authentication = getAuthentication(); if (authentication == null) { return null; } TokenDetails tokenDetails = (TokenDetails) authentication.getCredentials(); return tokenDetails.getRealm(); }
OidcSecurityDetailsServiceImpl implements OidcSecurityDetailsService { @Override public String getTokenRealm() { Authentication authentication = getAuthentication(); if (authentication == null) { return null; } TokenDetails tokenDetails = (TokenDetails) authentication.getCredentials(); return tokenDetails.getRealm(); } }
OidcSecurityDetailsServiceImpl implements OidcSecurityDetailsService { @Override public String getTokenRealm() { Authentication authentication = getAuthentication(); if (authentication == null) { return null; } TokenDetails tokenDetails = (TokenDetails) authentication.getCredentials(); return tokenDetails.getRealm(); }  }
OidcSecurityDetailsServiceImpl implements OidcSecurityDetailsService { @Override public String getTokenRealm() { Authentication authentication = getAuthentication(); if (authentication == null) { return null; } TokenDetails tokenDetails = (TokenDetails) authentication.getCredentials(); return tokenDetails.getRealm(); }  @Override String getTokenRealm(); @Override String getTokenUser(); }
OidcSecurityDetailsServiceImpl implements OidcSecurityDetailsService { @Override public String getTokenRealm() { Authentication authentication = getAuthentication(); if (authentication == null) { return null; } TokenDetails tokenDetails = (TokenDetails) authentication.getCredentials(); return tokenDetails.getRealm(); }  @Override String getTokenRealm(); @Override String getTokenUser();  }