mitreid-connect
クラス | 公開メンバ関数 | 限定公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter クラス
org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter の継承関係図
Inheritance graph
org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter 連携図
Collaboration graph

クラス

class  ClientAssertionRequestMatcher
 

公開メンバ関数

 JWTBearerClientAssertionTokenEndpointFilter (RequestMatcher additionalMatcher)
 
void afterPropertiesSet ()
 
Authentication attemptAuthentication (HttpServletRequest request, HttpServletResponse response) throws AuthenticationException, IOException, ServletException
 

限定公開メンバ関数

void successfulAuthentication (HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException, ServletException
 

非公開変数類

AuthenticationEntryPoint authenticationEntryPoint = new OAuth2AuthenticationEntryPoint()
 

詳解

Filter to check client authentication via JWT Bearer assertions.

著者
jricher

構築子と解体子

◆ JWTBearerClientAssertionTokenEndpointFilter()

org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter.JWTBearerClientAssertionTokenEndpointFilter ( RequestMatcher  additionalMatcher)
inline
56  {
57  super(new ClientAssertionRequestMatcher(additionalMatcher));
58  // If authentication fails the type is "Form"
59  ((OAuth2AuthenticationEntryPoint) authenticationEntryPoint).setTypeName("Form");
60  }
AuthenticationEntryPoint authenticationEntryPoint
Definition: JWTBearerClientAssertionTokenEndpointFilter.java:54

関数詳解

◆ afterPropertiesSet()

void org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter.afterPropertiesSet ( )
inline
63  {
64  super.afterPropertiesSet();
65  setAuthenticationFailureHandler(new AuthenticationFailureHandler() {
66  @Override
67  public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response,
68  AuthenticationException exception) throws IOException, ServletException {
69  if (exception instanceof BadCredentialsException) {
70  exception = new BadCredentialsException(exception.getMessage(), new BadClientCredentialsException());
71  }
72  authenticationEntryPoint.commence(request, response, exception);
73  }
74  });
75  setAuthenticationSuccessHandler(new AuthenticationSuccessHandler() {
76  @Override
77  public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
78  Authentication authentication) throws IOException, ServletException {
79  // no-op - just allow filter chain to continue to token endpoint
80  }
81  });
82  }
AuthenticationEntryPoint authenticationEntryPoint
Definition: JWTBearerClientAssertionTokenEndpointFilter.java:54

◆ attemptAuthentication()

Authentication org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter.attemptAuthentication ( HttpServletRequest  request,
HttpServletResponse  response 
) throws AuthenticationException, IOException, ServletException
inline

Pull the assertion out of the request and send it up to the auth manager for processing.

88  {
89 
90  // check for appropriate parameters
91  String assertionType = request.getParameter("client_assertion_type");
92  String assertion = request.getParameter("client_assertion");
93 
94  try {
95  JWT jwt = JWTParser.parse(assertion);
96 
97  String clientId = jwt.getJWTClaimsSet().getSubject();
98 
99  Authentication authRequest = new JWTBearerAssertionAuthenticationToken(jwt);
100 
101  return this.getAuthenticationManager().authenticate(authRequest);
102  } catch (ParseException e) {
103  throw new BadCredentialsException("Invalid JWT credential: " + assertion);
104  }
105  }

◆ successfulAuthentication()

void org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter.successfulAuthentication ( HttpServletRequest  request,
HttpServletResponse  response,
FilterChain  chain,
Authentication  authResult 
) throws IOException, ServletException
inlineprotected
109  {
110  super.successfulAuthentication(request, response, chain, authResult);
111  chain.doFilter(request, response);
112  }

メンバ詳解

◆ authenticationEntryPoint

AuthenticationEntryPoint org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter.authenticationEntryPoint = new OAuth2AuthenticationEntryPoint()
private

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