@Override
 protected Object createInternal(String type, ApiRequest request) {
   if (!StringUtils.equals(AbstractTokenUtil.TOKEN, request.getType())) {
     return null;
   }
   return createToken(request);
 }
 public Account getAccountAccess(String token, ApiRequest request) {
   if (!StringUtils.equals(AbstractTokenUtil.TOKEN, request.getType()) && isConfigured()) {
     request.setAttribute(tokenUtils().tokenType(), token);
     return getAccountAccessInternal();
   }
   return null;
 }
 @Override
 public Account getAccount(ApiRequest request) {
   if (!StringUtils.equals(AbstractTokenUtil.TOKEN, request.getType()) && isConfigured()) {
     tokenUtils().findAndSetJWT();
     return getAccountAccessInternal();
   }
   return null;
 }
Exemple #4
0
  @Override
  protected Object createInternal(String type, ApiRequest request) {
    if (!StringUtils.equals(ADConstants.CONFIG, request.getType())) {
      return null;
    }

    LDAPConstants config = request.proxyRequestObject(LDAPConstants.class);
    LDAPUtils.validateConfig(config);
    return updateCurrentConfig(config);
  }