Package org.apache.cxf.rs.security.oauth.provider

Examples of org.apache.cxf.rs.security.oauth.provider.MD5SequenceGenerator


            clientApp.setError("Client name field is required!");

            return handleInternalRedirect(clientApp);
        }

        MD5SequenceGenerator tokenGen = new MD5SequenceGenerator();
        Principal principal = SecurityContextHolder.getContext().getAuthentication();
        String consumerKey = clientApp.getConsumerKey();
        if (StringUtils.isEmpty(consumerKey)) {
            consumerKey = tokenGen
                .generate((principal.getName() + clientApp.getClientName()).getBytes("UTF-8"));
        }

        String secretKey = tokenGen.generate(new SecureRandom().generateSeed(20));

        Client clientInfo =
            new Client(consumerKey, secretKey, clientApp.getClientName(), null);
        clientInfo.setCallbackURI(clientApp.getCallbackURL());
        clientInfo.setLoginName(principal.getName());
View Full Code Here


            clientApp.setError("Client name field is required!");

            return handleInternalRedirect(clientApp);
        }

        MD5SequenceGenerator tokenGen = new MD5SequenceGenerator();
        Principal principal = SecurityContextHolder.getContext().getAuthentication();
        String consumerKey = clientApp.getConsumerKey();
        if (StringUtils.isEmpty(consumerKey)) {
            consumerKey = tokenGen
                .generate((principal.getName() + clientApp.getClientName()).getBytes("UTF-8"));
        }

        String secretKey = tokenGen.generate(new SecureRandom().generateSeed(20));

        Client clientInfo =
            new Client(consumerKey, secretKey, clientApp.getClientName(),
                clientApp.getCallbackURL());
        clientInfo.setLoginName(principal.getName());
View Full Code Here

TOP

Related Classes of org.apache.cxf.rs.security.oauth.provider.MD5SequenceGenerator

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.