Package com.sun.enterprise.security.auth.nonce

Examples of com.sun.enterprise.security.auth.nonce.StringNonce


    public boolean isValid(StringNonce nonce){
        return nonceManager.validateNonce(nonce);
    }

    public boolean isSentNonce(String nonce){
        return localNonceCache.validateNonce(new StringNonce(nonce));
    }
View Full Code Here


            //  AssertedPrincipalInfo ap = new AssertedPrincipalInfo(mappedPrincipals[0].getName(), pAssrtValues, id, true);
            AssertedCredentials creds =
                    new AssertedCredentials(realmName,
                    mappedPrincipals[0].getName(), null);
            LoginContextDriver.login(creds);
            if(!rp.validateAndCacheNonce(new StringNonce(request.getCallId()))){
                throw new SecurityException("Identity Authentication failed");
            }
            SecurityContext secCtx = SecurityContext.getCurrent();
            return new WebPrincipal(creds.getUserName(), null, secCtx);          
        } catch (LoginException le) {
View Full Code Here

            }
            Properties props = generator.getParsedValues();
            String nonce = props.getProperty("nonce");
            String nc = props.getProperty("nc");
            String nextNonce = null;
            StringNonce sn = new StringNonce(nonce);
            StringNonce sn2 = new StringNonce(nonce+nc);
            if (localNonceCache.hasNonce(sn) && !isValid(sn2)) {
                return null;
            }

View Full Code Here

        String authenticateHeader = "Digest realm=\"" + realmName + "\", " +
                "qop=\"auth\", nonce=\"" + nonce + "\", " +
                "opaque=\"" + generateNOnce(request) + "\"," + "stale=" + staleValue+",algorithm=MD5";

        localNonceCache.validateNonce(new StringNonce(nonce));
        if (!proxy) {
            response.setHeader("WWW-Authenticate", authenticateHeader);
        } else {
            response.setHeader("Proxy-Authenticate", authenticateHeader);
        }
View Full Code Here

        return authInfoHeader;
    }

    public String createAuthInfoHeader(SipServletRequest request, String nonceCount) {
        String nonce = generateNOnce(request);
        localNonceCache.validateNonce(new StringNonce(nonce));
        StringBuilder builder = new StringBuilder();
        builder.append("nextnonce=\"");
        builder.append(nonce);
        builder.append("\",qop=\"auth\"");
        builder.append(",nc=");
View Full Code Here

TOP

Related Classes of com.sun.enterprise.security.auth.nonce.StringNonce

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.