use of org.pac4j.core.credentials.AnonymousCredentials in project cas by apereo.
the class DelegatedClientAuthenticationHandlerTests method verifyMissingClient.
@Test
public void verifyMissingClient() {
val facebookProfile = new FacebookProfile();
facebookProfile.setId(ID);
this.fbClient.setProfileCreator((oAuth20Credentials, webContext, sessionStore) -> Optional.of(facebookProfile));
val cc = new ClientCredential(new AnonymousCredentials(), "UnknownClient");
assertThrows(PreventedException.class, () -> this.handler.authenticate(cc));
}
Aggregations