Examples of Authentication


Examples of com.alu.e3.prov.restapi.model.Authentication

    return th;
  }

  private static final Authentication fromDataModel(SBAuthentication authentication) {
    if (authentication==null) return null; // throw new IllegalArgumentException("authentication must not be null");
    Authentication a = new Authentication();
    a.setType  (authentication.getType());
    a.setData  (fromDataModelToData(authentication.getKeys()));
    return a;
  }
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.domain.Authentication

  @Override
  public Authentication parse(JSONObject json) throws JSONException {
    final SessionCookie sessionCookie = sessionCookieJsonParser.parse(json.getJSONObject("session"));
    final LoginInfo loginInfo = loginInfoJsonParser.parse(json.getJSONObject("loginInfo"));
    return new Authentication(loginInfo, sessionCookie);
  }
View Full Code Here

Examples of com.atlassian.jira.rest.client.domain.Authentication

    private final LoginInfoJsonParser loginInfoJsonParser = new LoginInfoJsonParser();
    @Override
    public Authentication parse(JSONObject json) throws JSONException {
        final SessionCookie sessionCookie = sessionCookieJsonParser.parse(json.getJSONObject("session"));
        final LoginInfo loginInfo = loginInfoJsonParser.parse(json.getJSONObject("loginInfo"));
        return new Authentication(loginInfo, sessionCookie);
    }
View Full Code Here

Examples of com.company.client.domain.Authentication

   */
  public void login(String userName) throws AuthenticationException {
    if (userName.equals("badguy")) {
      throw new AuthenticationException();
    }
    authentication = new Authentication(userName);
  }
View Full Code Here

Examples of com.cosmo.security.auth.Authentication

      pc.setTitle("Crear compte d'usuari - " + getWorkspace().getName());

      try
      {
         // Comprueba si el agente es el adecuado
         Authentication ap = AuthenticationFactory.getInstance(getWorkspace());
         if (!(ap instanceof PostgreSqlAuthenticationImpl))
         {
            DynamicMessageControl msg = new DynamicMessageControl(getWorkspace(), "msg");
            msg.setType(MessageTypes.Error);
            msg.setMessage("Nom�s es poden gestionar els comptes d'usuari amb el prove�dor natiu de Cosmo (PostgreSqlAuthenticationProvider).");
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jetty.client.api.Authentication

                LOG.debug("Authentication challenge without {} header", header);
                forwardFailureComplete(request, null, response, new HttpResponseException("HTTP protocol violation: Authentication challenge without " + header + " header", response));
                return;
            }

            Authentication authentication = null;
            Authentication.HeaderInfo headerInfo = null;
            URI uri = getAuthenticationURI(request);
            if (uri != null)
            {
                for (Authentication.HeaderInfo element : headerInfos)
                {
                    authentication = client.getAuthenticationStore().findAuthentication(element.getType(), uri, element.getRealm());
                    if (authentication != null)
                    {
                        headerInfo = element;
                        break;
                    }
                }
            }
            if (authentication == null)
            {
                LOG.debug("No authentication available for {}", request);
                forwardSuccessComplete(request, response);
                return;
            }

            final Authentication.Result authnResult = authentication.authenticate(request, response, headerInfo, conversation);
            LOG.debug("Authentication result {}", authnResult);
            if (authnResult == null)
            {
                forwardSuccessComplete(request, response);
                return;
View Full Code Here

Examples of com.foreach.cuke.rest.authentication.Authentication

    if ( Arrays.asList( HttpMethod.POST, HttpMethod.PUT ).contains( httpMethod ) ) {
      headers.setContentType( MediaType.APPLICATION_FORM_URLENCODED );
    }
    headers.setAccept( Arrays.asList( MediaType.APPLICATION_JSON ) );

    Authentication defaultAuthentication = context.lookup( "rest.base.auth" );

    if ( defaultAuthentication != null ) {
      LOG.debug( "applying default request authentication {}", defaultAuthentication );
      defaultAuthentication.apply( uri, headers );
    }

    MultiValueMap<String, Object> values = new LinkedMultiValueMap<String, Object>();

    if ( dataTable != null ) {
      DataTable cleanedTable = fixTableHeader( dataTable );
      boolean hasTypeSpec = cleanedTable.topCells().size() > 2;

      for ( Map<String, String> row : cleanedTable.asMaps( String.class, String.class ) ) {
        String name = spel.getValueAsString( row.get( "name" ) );
        String value = spel.getValueAsString( row.get( "value" ) );
        String type = row.get( "type" );

        if ( type != null ) {
          type = spel.getValueAsString( type );
        }
        else {
          type = "data";
        }

        // Content-type is a special case
        if ( StringUtils.startsWithIgnoreCase( type, "query" ) ) {
          uri.queryParam( name, value );
        }
        else if ( StringUtils.equalsIgnoreCase( type, "header" ) ) {
          if ( StringUtils.equalsIgnoreCase( "content-type", name ) ) {
            headers.setContentType( MediaType.valueOf( value ) );
          }
          else {
            headers.add( name, value );
          }
        }
        else if ( StringUtils.startsWithIgnoreCase( type, "auth" )
            || ( !hasTypeSpec
            && ( StringUtils.equals( name, "auth" ) || StringUtils.equals( name, "authentication" ) ) )
            ) {
          Authentication authentication = context.lookup( value );

          if ( authentication == null ) {
            fail( "No authentication configured under variable " + value );
          }

          LOG.debug( "applying request authentication {}", authentication );
          authentication.apply( uri, headers );
        }
        else if ( StringUtils.equalsIgnoreCase( "content-type", name ) ) {
          headers.setContentType( MediaType.valueOf( value ) );
        }
        else if ( StringUtils.equalsIgnoreCase( type, "data" ) ) {
View Full Code Here

Examples of com.genesys.wsclient.impl.Authentication

    this.bayeuxClient = createBayeuxClient(builder);
    this.eventExecutor = builder.eventExecutor;
  }
 
  private static BayeuxClient createBayeuxClient(Setup builder) {
    final Authentication authentication = builder.authentication;
   
    HashMap<String, Object> longPollingOptions = new HashMap<>();   
    LongPollingTransport longPollingTransport = new LongPollingTransport(longPollingOptions, builder.client.httpClient) {

      @Override protected void customize(ContentExchange exchange) {
        super.customize(exchange);
        HttpRequest request = new Jetty769HttpRequest(exchange);
        authentication.setupRequest(request);
        logRequest(exchange);
      }
     
      @Override protected void debug(String message, Object... args) {
        LOG_EVENT_TRANSPORT.debug(message, args);
View Full Code Here

Examples of com.github.dynamicextensionsalfresco.webscripts.annotations.Authentication

  protected void handleTypeAnnotations(final String beanName, final WebScript webScript,
      final DescriptionImpl description) {
    final ConfigurableListableBeanFactory beanFactory = getBeanFactory();
    handleWebScriptAnnotation(webScript, beanName, description);
    Authentication authentication = beanFactory.findAnnotationOnBean(beanName, Authentication.class);
    if (authentication == null) {
      authentication = getDefaultAuthenticationAnnotation();
    }
    handleAuthenticationAnnotation(authentication, beanName, description);
    Transaction transaction = beanFactory.findAnnotationOnBean(beanName, Transaction.class);
View Full Code Here

Examples of com.github.ebnew.ki4so.core.authentication.Authentication

    if(result==null || request==null || response==null){
      return mv;
    }
    if (result.isSuccess()) {
      //登录结果对象。
      Authentication authentication = result.getAuthentication();

      //清除session中的状态信息service值。
      request.getSession().removeAttribute(WebConstants.KI4SO_SERVICE_KEY_IN_SESSION);
     
      // 如果有加密凭据信息,则写入加密凭据值到cookie中。
      if (authentication != null
          && authentication.getAttributes() != null) {
        Map<String, Object> attributes = authentication.getAttributes();
        // ki4so服务端加密的凭据存在,则写入cookie中。
        if (attributes
            .get(AuthenticationPostHandler.KI4SO_SERVER_EC_KEY) != null) {
          response.addCookie(new Cookie(
              WebConstants.KI4SO_SERVER_ENCRYPTED_CREDENTIAL_COOKIE_KEY,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.