Package org.springframework.ws.soap.security.callback

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



    @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

    }

    @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

    @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

  @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

    @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

    }

    @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

    @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

    @Test
    @Ignore("Does not run under JDK 1.8")
    public void encryptAlias() throws Exception {
        interceptor.setPolicyConfiguration(new ClassPathResource("encrypt-alias-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

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

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

TOP

Related Classes of org.springframework.ws.soap.security.callback.AbstractCallbackHandler

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.