Examples of DefaultCallbackHandler


Examples of org.jboss.as.cli.operation.impl.DefaultCallbackHandler

            }}), "--property-id");
        idProperty.addRequiredPreceding(nodePath);

        commandName = new ArgumentWithValue(this, new DefaultCompleter(new CandidatesProvider(){

            private final DefaultCallbackHandler callback = new DefaultCallbackHandler();

            @Override
            public List<String> getAllCandidates(CommandContext ctx) {

                final String actionName = action.getValue(ctx.getParsedCommandLine());
                if(actionName == null) {
                    return Collections.emptyList();
                }

                if (actionName.equals("add")) {
                   final String thePath = nodePath.getValue(ctx.getParsedCommandLine());
                   if (thePath == null) {
                      return Collections.emptyList();
                   }

                   callback.reset();
                   try {
                       ParserUtil.parseOperationRequest(thePath, callback);
                   } catch (CommandFormatException e) {
                       return Collections.emptyList();
                   }

                   OperationRequestAddress typeAddress = callback.getAddress();
                   if (!typeAddress.endsOnType()) {
                       return Collections.emptyList();
                   }
                   return Collections.singletonList(typeAddress.getNodeType());
               }
View Full Code Here

Examples of org.jboss.as.cli.operation.impl.DefaultCallbackHandler

        ModelNode request = new ModelNode();
        ModelNode address = request.get(Util.ADDRESS);

        final String type = nodePath.getValue(ctx.getParsedCommandLine());
        if(callback == null) {
            callback = new DefaultCallbackHandler();
        } else {
            callback.reset();
        }
        ParserUtil.parseOperationRequest(type, callback);
View Full Code Here

Examples of org.jboss.as.cli.operation.impl.DefaultCallbackHandler

        ModelNode request = new ModelNode();
        ModelNode address = request.get(Util.ADDRESS);

        if(callback == null) {
            callback = new DefaultCallbackHandler();
        } else {
            callback.reset();
        }

        try {
View Full Code Here

Examples of org.jscep.client.DefaultCallbackHandler

    @Before
    public void setUp() throws GeneralSecurityException {
  X500Principal subject = new X500Principal("CN=example");
  KeyPair keyPair = KeyPairGenerator.getInstance("RSA").genKeyPair();
  cert = X509Certificates.createEphemeral(subject, keyPair);
  handler = new DefaultCallbackHandler(new ConsoleCertificateVerifier());
    }
View Full Code Here

Examples of org.mortbay.jaas.callback.DefaultCallbackHandler

            if (userPrincipal != null) {
                userMap.remove(username);
            }


            DefaultCallbackHandler callbackHandler = new DefaultCallbackHandler();

            callbackHandler.setUserName(username);
            callbackHandler.setCredential(credentials);

            //set up the login context
            LoginContext loginContext = new LoginContext(loginModuleName,
                                                         callbackHandler);
View Full Code Here

Examples of org.mortbay.jetty.plus.jaas.callback.DefaultCallbackHandler

        options.put( "forceBindingLogin", "true" );
        options.put("useLdaps", "false");
        options.put( "debug", "true" );

        Subject subject = new Subject();
        DefaultCallbackHandler callbackHandler = new DefaultCallbackHandler();
        callbackHandler.setUserName("jesse");
        callbackHandler.setCredential("foo");
        lm.initialize( subject, callbackHandler, null, options );

        assertTrue( lm.bindingLogin( "jesse", "foo" ) );

        assertTrue( lm.login() );
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.