Examples of AbstractCallbackHandler


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

            Object credentials,
            Request request)
    {
        try
        {             
            AbstractCallbackHandler callbackHandler = null;
           
            //user has not been authenticated
            if (callbackHandlerClass == null)
            {
                Log.warn("No CallbackHandler configured: using DefaultCallbackHandler");
                callbackHandler = new DefaultCallbackHandler();
            }
            else
            {
                callbackHandler = (AbstractCallbackHandler)Loader.loadClass(JAASUserRealm.class, callbackHandlerClass).getConstructors()[0].newInstance(new Object[0]);
            }
           
            if (callbackHandler instanceof DefaultCallbackHandler)
            {
                ((DefaultCallbackHandler)callbackHandler).setRequest (request);
            }
           
            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.AbstractCallbackHandler

            Object credentials,
            Request request)
    {
        try
        {             
            AbstractCallbackHandler callbackHandler = null;
           
            //user has not been authenticated
            if (callbackHandlerClass == null)
            {
                Log.warn("No CallbackHandler configured: using DefaultCallbackHandler");
                callbackHandler = new DefaultCallbackHandler();
            }
            else
            {
                callbackHandler = (AbstractCallbackHandler)Loader.loadClass(JAASUserRealm.class, callbackHandlerClass).getConstructors()[0].newInstance(new Object[0]);
            }
           
            if (callbackHandler instanceof DefaultCallbackHandler)
            {
                ((DefaultCallbackHandler)callbackHandler).setRequest (request);
            }
           
            callbackHandler.setUserName(username);
            callbackHandler.setCredential(credentials);
           
           
            //set up the login context
            LoginContext loginContext = new LoginContext(loginModuleName,
                    callbackHandler);
View Full Code Here

Examples of org.springframework.ws.soap.security.callback.AbstractCallbackHandler

            final String username = plainTextRequest.getUsername();
            final String password = plainTextRequest.getPassword();

            LoginContext loginContext;
            try {
                loginContext = new LoginContext(getLoginContextName(), new AbstractCallbackHandler() {

                    @Override
                    protected void handleInternal(Callback callback) throws UnsupportedCallbackException {
                        if (callback instanceof NameCallback) {
                            ((NameCallback) callback).setName(username);
View Full Code Here

Examples of org.springframework.ws.soap.security.callback.AbstractCallbackHandler


    @Test
   public void testAddUsernameTokenDigest() throws Exception {
        interceptor.setPolicyConfiguration(new ClassPathResource("usernameToken-digest-config.xml", getClass()));
        CallbackHandler handler = new AbstractCallbackHandler() {

            @Override
            protected void handleInternal(Callback callback) {
                if (callback instanceof UsernameCallback) {
                    ((UsernameCallback) callback).setUsername("Bert");
View Full Code Here

Examples of org.springframework.ws.soap.security.callback.AbstractCallbackHandler

    }

    @Test
    public void testAddUsernameTokenPlainText() throws Exception {
        interceptor.setPolicyConfiguration(new ClassPathResource("usernameToken-plainText-config.xml", getClass()));
        CallbackHandler handler = new AbstractCallbackHandler() {

            @Override
            protected void handleInternal(Callback callback) {
                if (callback instanceof UsernameCallback) {
                    ((UsernameCallback) callback).setUsername("Bert");
View Full Code Here

Examples of org.springframework.ws.soap.security.callback.AbstractCallbackHandler

    @Test
    public void testAddUsernameTokenPlainTextNonce() throws Exception {
      interceptor.setPolicyConfiguration(
          new ClassPathResource("usernameToken-plainText-nonce-config.xml",
              getClass()));
      CallbackHandler handler = new AbstractCallbackHandler() {

        @Override
        protected void handleInternal(Callback callback) {
          if (callback instanceof UsernameCallback) {
            ((UsernameCallback) callback).setUsername("Bert");
View Full Code Here

Examples of org.springframework.ws.soap.security.callback.AbstractCallbackHandler

  @Test
    public void testValidateUsernameTokenPlainText() throws Exception {
        interceptor
                .setPolicyConfiguration(new ClassPathResource("requireUsernameToken-plainText-config.xml", getClass()));
        CallbackHandler handler = new AbstractCallbackHandler() {

            @Override
            protected void handleInternal(Callback callback) {
                if (callback instanceof PasswordValidationCallback) {
                    PasswordValidationCallback validationCallback = (PasswordValidationCallback) callback;
View Full Code Here

Examples of org.springframework.ws.soap.security.callback.AbstractCallbackHandler

    @Test
    public void testValidateUsernameTokenPlainTextNonce() throws Exception {
        interceptor
                .setPolicyConfiguration(new ClassPathResource("requireUsernameToken-plainText-nonce-config.xml", getClass()));
        CallbackHandler handler = new AbstractCallbackHandler() {

            @Override
            protected void handleInternal(Callback callback) {
                if (callback instanceof PasswordValidationCallback) {
                    PasswordValidationCallback validationCallback = (PasswordValidationCallback) callback;
View Full Code Here

Examples of org.springframework.ws.soap.security.callback.AbstractCallbackHandler

    }

    @Test
    public void testValidateUsernameTokenDigest() throws Exception {
        interceptor.setPolicyConfiguration(new ClassPathResource("requireUsernameToken-digest-config.xml", getClass()));
        CallbackHandler handler = new AbstractCallbackHandler() {

            @Override
            protected void handleInternal(Callback callback) {
                if (callback instanceof PasswordValidationCallback) {
                    PasswordValidationCallback validationCallback = (PasswordValidationCallback) callback;
View Full Code Here

Examples of org.springframework.ws.soap.security.callback.AbstractCallbackHandler

    @Test
    @Ignore("Does not run under JDK 1.8")
    public void encryptDefaultCertificate() throws Exception {
        interceptor.setPolicyConfiguration(new ClassPathResource("encrypt-config.xml", getClass()));
        CallbackHandler handler = new AbstractCallbackHandler() {

            @Override
            protected void handleInternal(Callback callback) {
                if (callback instanceof EncryptionKeyCallback) {
                    EncryptionKeyCallback keyCallback = (EncryptionKeyCallback) callback;
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.