40 HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
41 Mockito.when(request.getParameter(
"error")).thenReturn(
"Error");
42 Mockito.when(request.getParameter(
"error_description")).thenReturn(
"Description");
43 Mockito.when(request.getParameter(
"error_uri")).thenReturn(
"http://example.com");
48 fail(
"AuthorizationEndpointException expected.");
50 catch (AuthorizationEndpointException exception) {
51 assertThat(exception.getMessage(),
52 is(
"Error from Authorization Endpoint: Error Description http://example.com"));
54 assertThat(exception.getError(), is(
"Error"));
55 assertThat(exception.getErrorDescription(), is(
"Description"));
56 assertThat(exception.getErrorURI(), is(
"http://example.com"));
58 assertThat(exception, is(instanceOf(AuthenticationServiceException.class)));
OIDCAuthenticationFilter filter
Definition: TestOIDCAuthenticationFilter.java:35
Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
Definition: OIDCAuthenticationFilter.java:182