Examples of EncryptionService


Examples of org.apache.karaf.jaas.modules.EncryptionService

                    }
                }
                Arrays.sort(encryptionServiceReferences);
                for (ServiceReference ref : encryptionServiceReferences) {
                    try {
                        EncryptionService encryptionService = (EncryptionService) bundleContext.getService(ref);
                        if (encryptionService != null) {
                            try {
                                encryption = encryptionService.createEncryption(encOpts);
                                if (encryption != null) {
                                    break;
                                }
                            } finally {
                                bundleContext.ungetService(ref);
View Full Code Here

Examples of org.apache.karaf.jaas.modules.EncryptionService

                    }
                }
                Arrays.sort(encryptionServiceReferences);
                for (ServiceReference ref : encryptionServiceReferences) {
                    try {
                        EncryptionService encryptionService = (EncryptionService) bundleContext.getService(ref);
                        if (encryptionService != null) {
                            try {
                                encryption = encryptionService.createEncryption(encOpts);
                                if (encryption != null) {
                                    break;
                                }
                            } finally {
                                bundleContext.ungetService(ref);
View Full Code Here

Examples of org.apache.karaf.jaas.modules.EncryptionService

                    }
                }
                Arrays.sort(encryptionServiceReferences);
                for (ServiceReference ref : encryptionServiceReferences) {
                    try {
                        EncryptionService encryptionService = (EncryptionService) bundleContext.getService(ref);
                        if (encryptionService != null) {
                            try {
                                encryption = encryptionService.createEncryption(encOpts);
                                if (encryption != null) {
                                    break;
                                }
                            } finally {
                                bundleContext.ungetService(ref);
View Full Code Here

Examples of org.jtalks.jcommune.service.nontransactional.EncryptionService

    @Test
    public void userShouldBeRegisteredUsingEncryptedPassword() throws Exception{
        String password = "password";
        RegisterUserDto registerUserDto = createRegisterUserDto("username", password, "email@email.em", null);
        EncryptionService realEncryptionService = new EncryptionService(new Md5PasswordEncoder());
        TransactionalAuthenticator authenticatorSpy = spy(new TransactionalAuthenticator(pluginLoader, userDao, groupDao,
                realEncryptionService, mailService, avatarService, pluginService,
                securityFacade, rememberMeServices, sessionStrategy, validator, authenticationManager));

        authenticatorSpy.register(registerUserDto);
        UserDto expected = new UserDto();
        expected.setEmail("email@email.em");
        expected.setUsername("username");
        expected.setPassword(realEncryptionService.encryptPassword(password));

        verify(authenticatorSpy).registerByPlugin(refEq(expected), eq(true), any(BindingResult.class));
        verify(authenticatorSpy).storeRegisteredUser(refEq(expected));
    }
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.