Package org.jayasoft.woj.common.services.security

Examples of org.jayasoft.woj.common.services.security.NoUAKException


   
    final protected void wojDoPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        UAK uak = SecurityHelper.getUAK(request);
       
        if (uak == null) {
            throw new NoUAKException();
        } else {
            if (!uak.checkUserKey(WOJServer.getInstance().getPrivateKey())) {
                // we try to authenticate again
                // TODO : check if we are master or authenticate to master if we aren't
                Authentification a = WOJServer.getInstance().getAuthentificationService().authenticate(uak.getUserName(), uak.getUserPass(), uak.getComputerId(), uak.getPluginVersion());
View Full Code Here


      }
        // here we can't check security more than that, because there are good chance the uak key has been
        // computed with another master private key
        UAK uak = SecurityHelper.getUAK(m);
        if (uak == null) {
            throw new NoUAKException();
        }
        String encodedObject = (String) m.get(ServerCommands.NOTIFY_NEW_MASTER.P_SERVER);
        Server server = (Server) ServiceProvider.getDefault().getEncodingService().decode(encodedObject);
        encodedObject = (String) m.get(ServerCommands.NOTIFY_NEW_MASTER.P_KEY);
        encodedObject = encodedObject == null ? "" : encodedObject.trim();
View Full Code Here

        return checkUAK(getUAK(p));
    }

    public static UAK checkUAK(UAK uak) {
        if (uak == null) {
            throw new NoUAKException();
        } else {
            if (!uak.checkUserKey(WOJServer.getInstance().getPrivateKey())) {
                throw new InvalidUAKException(uak);
            }
            return uak;
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.services.security.NoUAKException

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.