View Javadoc

1   package com.atlassian.asap.core.server.http;
2   
3   import com.atlassian.asap.api.server.http.RequestAuthenticator;
4   import com.atlassian.asap.core.server.AuthenticationContext;
5   import com.atlassian.asap.core.validator.JwtValidator;
6   import com.atlassian.asap.core.validator.JwtValidatorImpl;
7   
8   
9   /**
10   * Default RequestAuthenticatorFactory which passes the auth context to JwtValidator as is. May be overridden in projects.
11   */
12  public class RequestAuthenticatorFactory {
13      public RequestAuthenticator create(AuthenticationContext authContext) {
14          JwtValidator jwtValidator = JwtValidatorImpl.createDefault(authContext);
15          return new RequestAuthenticatorImpl(jwtValidator);
16      }
17  }