Package com.bradmcevoy.http.http11

Examples of com.bradmcevoy.http.http11.Http11Protocol


     *
     * @param nonceProvider
     */
    public AuthenticationService( NonceProvider nonceProvider ) {
        AuthenticationHandler digest = new DigestAuthenticationHandler( nonceProvider );
        AuthenticationHandler basic = new BasicAuthHandler();

        authenticationHandlers = new ArrayList<AuthenticationHandler>();
        authenticationHandlers.add( basic );
        authenticationHandlers.add( digest );
        setAllHandlers();
View Full Code Here


     * Creates with Basic and Digest handlers
     *
     */
    public AuthenticationService() {
        AuthenticationHandler digest = new DigestAuthenticationHandler();
        AuthenticationHandler basic = new BasicAuthHandler();
        authenticationHandlers = new ArrayList<AuthenticationHandler>();
        authenticationHandlers.add( basic );
        authenticationHandlers.add( digest );
        setAllHandlers();
    }
View Full Code Here

    log.debug("WebDAV Server initialization");
    if( authenticationService == null ) {
      dbConnection = new DBConnection()//PostgreSQL connection
      ArrayList<AuthenticationHandler> authHandls = new ArrayList<AuthenticationHandler>();
      authHandls.add(new BasicAuthHandler());
      authenticationService = new AuthenticationService(authHandls);
      //TODO sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
      resourceFactory = new ResourcesManager();     
      dataInitializing();
    }
View Full Code Here

     * Creates basic and digest handlers with the given NonceProvider
     *
     * @param nonceProvider
     */
    public AuthenticationService( NonceProvider nonceProvider ) {
        AuthenticationHandler digest = new DigestAuthenticationHandler( nonceProvider );
        AuthenticationHandler basic = new BasicAuthHandler();

        authenticationHandlers = new ArrayList<AuthenticationHandler>();
        authenticationHandlers.add( basic );
        authenticationHandlers.add( digest );
View Full Code Here

    /**
     * Creates with Basic and Digest handlers
     *
     */
    public AuthenticationService() {
        AuthenticationHandler digest = new DigestAuthenticationHandler();
        AuthenticationHandler basic = new BasicAuthHandler();
        authenticationHandlers = new ArrayList<AuthenticationHandler>();
        authenticationHandlers.add( basic );
        authenticationHandlers.add( digest );
        setAllHandlers();
View Full Code Here

  public Object authenticate(DigestResponse digestResp) {
    WebdavUser wu = getUser(digestResp.getUser());
    if (wu == null)
      return null;
   
        String serverResponse = new DigestGenerator().generateDigest( digestResp, wu.getPassword() );
        String clientResponse = digestResp.getResponseDigest();

        return serverResponse.equals(clientResponse) ? wu : null;
  }
View Full Code Here

       
    LockManager lockManager = new SimpleLockManager();
    Map<String, String> users = new HashMap<String, String>();
    users.put("me", "pwd");
    SimpleSecurityManager securityManager = new SimpleSecurityManager("demo", users);
    securityManager.setDigestGenerator(new DigestGenerator());
   
    String home = System.getProperty("user.dir");
    File root = new File(home);
   
    FileSystemResourceFactory rf = new FileSystemResourceFactory(root, securityManager, home);
View Full Code Here

        if( this.user == null ) {
            log.debug( "no user defined, so allow access" );
            return "ok";
        }

        DigestGenerator dg = new DigestGenerator();
        String serverResponse = dg.generateDigest( digestRequest, password );
        String clientResponse = digestRequest.getResponseDigest();

        log.debug( "server resp: " + serverResponse );
        log.debug( "given response: " + clientResponse );
View Full Code Here

    private String realm;
    private Map<String,String> nameAndPasswords;
    private DigestGenerator digestGenerator;

    public SimpleSecurityManager() {
        digestGenerator = new DigestGenerator();
    }
View Full Code Here

            }
        }
    }

    public Object authenticate(DigestResponse digestRequest) {
        DigestGenerator dg = new DigestGenerator();
        String serverResponse = dg.generateDigest(digestRequest, password);
        String clientResponse = digestRequest.getResponseDigest();
        log.debug("server resp: " + serverResponse);
        log.debug("given response: " + clientResponse);
        if (serverResponse.equals(clientResponse)) {
            return "ok";
View Full Code Here

TOP

Related Classes of com.bradmcevoy.http.http11.Http11Protocol

Copyright © 2018 www.massapicom. 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.