Package org.restlet.security

Examples of org.restlet.security.SecretVerifier


            //end TODO
           
            // Guard the restlet with BASIC authentication.
            ChallengeAuthenticator guard = new ChallengeAuthenticator(null, ChallengeScheme.HTTP_BASIC, "testRealm");
            // Instantiates a Verifier of identifier/secret couples based on a simple Map.
            guard.setVerifier(new SecretVerifier(){
               
                    @Override
                    public int verify(String identifier, char[] secret) {
                        if (getApi().getAuth().login(identifier, secret)){
                        return RESULT_VALID;
View Full Code Here


  /**
   * Creates a root Restlet that will receive all incoming calls.
   */
  @Override
  public synchronized Restlet createInboundRoot() {
    Verifier verifier = new SecretVerifier() {

      @Override
      public boolean verify(String username, char[] password) throws IllegalArgumentException {
        boolean verified = ActivitiUtil.getIdentityService().checkPassword(username, new String(password));
        return verified;
View Full Code Here

TOP

Related Classes of org.restlet.security.SecretVerifier

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.