use of org.pac4j.http.credentials.authenticator.test.SimpleTestTokenAuthenticator in project pac4j by pac4j.
the class DirectDigestAuthClientTests method testMissingProfileCreator.
@Test
public void testMissingProfileCreator() {
final DirectDigestAuthClient digestAuthClient = new DirectDigestAuthClient(new SimpleTestTokenAuthenticator(), null);
TestsHelper.expectException(() -> digestAuthClient.getUserProfile(new DigestCredentials(TOKEN, HTTP_METHOD.POST.name(), null, null, null, null, null, null, null), MockWebContext.create()), TechnicalException.class, "profileCreator cannot be null");
}
use of org.pac4j.http.credentials.authenticator.test.SimpleTestTokenAuthenticator in project pac4j by pac4j.
the class HeaderClientTests method testHasDefaultProfileCreator.
@Test
public void testHasDefaultProfileCreator() {
final HeaderClient client = new HeaderClient(HEADER_NAME, new SimpleTestTokenAuthenticator());
client.init();
}
use of org.pac4j.http.credentials.authenticator.test.SimpleTestTokenAuthenticator in project pac4j by pac4j.
the class HeaderClientTests method testMissingProfileCreator.
@Test
public void testMissingProfileCreator() {
final HeaderClient client = new HeaderClient(NAME, new SimpleTestTokenAuthenticator());
client.setProfileCreator(null);
TestsHelper.expectException(() -> client.getUserProfile(new TokenCredentials(TOKEN), MockWebContext.create()), TechnicalException.class, "profileCreator cannot be null");
}
use of org.pac4j.http.credentials.authenticator.test.SimpleTestTokenAuthenticator in project pac4j by pac4j.
the class IpClientTests method testHasDefaultProfileCreator.
@Test
public void testHasDefaultProfileCreator() {
final IpClient client = new IpClient(new SimpleTestTokenAuthenticator());
client.init();
}
use of org.pac4j.http.credentials.authenticator.test.SimpleTestTokenAuthenticator in project pac4j by pac4j.
the class ParameterClientTests method testMissingParameterName.
@Test
public void testMissingParameterName() {
final ParameterClient client = new ParameterClient(null, new SimpleTestTokenAuthenticator());
TestsHelper.initShouldFail(client, "parameterName cannot be blank");
}
Aggregations