Examples of Authentication


Examples of org.apache.cactus.client.authentication.Authentication

        URL url = new URL(this.url);

        // Add Authentication headers, if necessary. This is the first
        // step to allow authentication to add extra headers, HTTP parameters,
        // etc.
        Authentication authentication = theRequest.getAuthentication();

        if (authentication != null)
        {
            authentication.configure(theRequest, theConfiguration);
        }

        // Add the parameters that need to be passed as part of the URL
        url = HttpUtil.addHttpGetParameters(theRequest, url);
View Full Code Here

Examples of org.apache.ftpserver.ftplet.Authentication

                            .getRemoteAddress()).getAddress());
                }
                userMetadata.setCertificateChain(session
                        .getClientCertificates());

                Authentication auth;
                if (anonymous) {
                    auth = new AnonymousAuthentication(userMetadata);
                } else {
                    auth = new UsernamePasswordAuthentication(userName,
                            password, userMetadata);
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authentication.Authentication

    /**
     * @param userId
     */
    public TrustedCredentials(final String userId) {
        principal = getPrincipal(userId);
        authentication = new Authentication() {

            public boolean canHandle(Credentials credentials) {
                return (credentials instanceof AdministrativeCredentials)
                        || (credentials instanceof AnonCredentials);
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authentication.Authentication

        if (credentials == null || userId == null) {
            log.debug("Could not extract userId/credentials");
            return false;
        }

        Authentication authentication = new UserAuthentication(userId, getUserManager());
        boolean success = authentication.authenticate(credentials);
        if (success) {
            principals = getPrincipals(userId);

            log.debug("Adding Credentials to shared state.");
            sharedState.put(SHARED_KEY_CREDENTIALS, credentials);
View Full Code Here

Examples of org.apache.maven.artifact.ant.Authentication

    upload.getRepositories().withType( MavenDeployer.class ).all(
        new Action<MavenDeployer>() {
          public void execute(MavenDeployer deployer) {
            final RemoteRepository repository =  deployer.getRepository();
            if ( repository != null ) {
              final Authentication authentication = locateAuthenticationDetails( repository );
              if ( authentication != null ) {
                repository.addAuthentication( authentication );
              }
            }
            final RemoteRepository snapshotRepository = deployer.getSnapshotRepository();
            if ( snapshotRepository != null ) {
              final Authentication authentication = locateAuthenticationDetails( snapshotRepository );
              if ( authentication != null ) {
                snapshotRepository.addAuthentication( authentication );
              }
            }
          }
View Full Code Here

Examples of org.apache.maven.artifact.repository.Authentication

                        {
                            logger.debug( problem.getMessage(), problem.getException() );
                        }
                    }

                    Authentication authentication = new Authentication( server.getUsername(), server.getPassword() );
                    authentication.setPrivateKey( server.getPrivateKey() );
                    authentication.setPassphrase( server.getPassphrase() );

                    repository.setAuthentication( authentication );
                }
                else
                {
View Full Code Here

Examples of org.auraframework.system.AuraContext.Authentication

   
    protected void parseAccessItem(String namespace, String item) throws InvalidAccessValueException {
        // See if we have authentication
        String ucItem = item.toUpperCase();
        try {
            Authentication auth = Authentication.valueOf(ucItem);
            if (authentication != null && auth != authentication) {
                throw new InvalidAccessValueException("Access attribute cannot specify both AUTHENTICATED and UNAUTHENTICATED");
            }
            authentication = auth;
            return;
View Full Code Here

Examples of org.beangle.security.auth.Authentication

    // 避免login没有权限,出现死循环
    if (!freeResources.contains(resource) && !monitor.isPublicResource(resource)) {
      OnlineActivity info = monitor.getAuthenticationManager().getSessionController()
          .getOnlineActivity(session.getId());
      if (null == info) {
        Authentication auth = null;
        // remember me
        if (monitor.isEnableRememberMe()) {
          auth = monitor.getRememberMeService().autoLogin(httpRequest);
        }
        if (null == auth) {
          auth = new SsoAuthentication(httpRequest);
          auth.setDetails(userDetailsSource.buildDetails(httpRequest));
        }
        try {
          monitor.authenticate(auth);
        } catch (AuthenticationException e) {
          // 记录访问失败的URL
View Full Code Here

Examples of org.beangle.security.core.Authentication

    if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) { return "failure"; }
    username = username.trim();
    HttpServletRequest request = getRequest();
    UsernamePasswordAuthentication auth = new UsernamePasswordAuthentication(username, password);
    auth.setDetails(authenticationDetailsSource.buildDetails(request));
    Authentication authRequest = auth;
    try {
      authRequest = authenticationManager.authenticate(authRequest);
      sessionRegistry.register(authRequest, request.getSession().getId());
      SecurityContextHolder.getContext().setAuthentication(authRequest);
    } catch (AuthenticationException e) {
View Full Code Here

Examples of org.beangle.security.core.Authentication

public final class SecurityUtils {

  private static ThreadLocal<String> resource = new ThreadLocal<String>();

  private static UserToken getPrincipal() {
    Authentication auth = SecurityContextHolder.getContext().getAuthentication();
    if (null == auth) throw new AuthenticationException();
    UserToken user = (UserToken) auth.getPrincipal();
    if (null == user.getId()) throw new AuthenticationException();
    return user;
  }
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.