mitreid-connect
公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.mitre.openid.connect.client.TestOIDCAuthenticationFilter クラス
org.mitre.openid.connect.client.TestOIDCAuthenticationFilter 連携図
Collaboration graph

公開メンバ関数

void attemptAuthentication_error () throws Exception
 

非公開変数類

OIDCAuthenticationFilter filter = new OIDCAuthenticationFilter()
 

詳解

関数詳解

◆ attemptAuthentication_error()

void org.mitre.openid.connect.client.TestOIDCAuthenticationFilter.attemptAuthentication_error ( ) throws Exception
inline
38  {
39 
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");
44 
45  try {
46  filter.attemptAuthentication(request, mock(HttpServletResponse.class));
47 
48  fail("AuthorizationEndpointException expected.");
49  }
50  catch (AuthorizationEndpointException exception) {
51  assertThat(exception.getMessage(),
52  is("Error from Authorization Endpoint: Error Description http://example.com"));
53 
54  assertThat(exception.getError(), is("Error"));
55  assertThat(exception.getErrorDescription(), is("Description"));
56  assertThat(exception.getErrorURI(), is("http://example.com"));
57 
58  assertThat(exception, is(instanceOf(AuthenticationServiceException.class)));
59  }
60  }
OIDCAuthenticationFilter filter
Definition: TestOIDCAuthenticationFilter.java:35
Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
Definition: OIDCAuthenticationFilter.java:182

メンバ詳解

◆ filter

OIDCAuthenticationFilter org.mitre.openid.connect.client.TestOIDCAuthenticationFilter.filter = new OIDCAuthenticationFilter()
private

このクラス詳解は次のファイルから抽出されました: