qopList = wwwAuthenticateHeader.getQop(); } else { qopList = authorizationHeader.getQop(); algorithm = wwwAuthenticateHeader.getAlgorithm(); } else { algorithm = authorizationHeader.getAlgorithm(); realm = wwwAuthenticateHeader.getRealm(); } else { realm = authorizationHeader.getRealm(); scheme = wwwAuthenticateHeader.getScheme(); } else { scheme = authorizationHeader.getScheme(); opaque = wwwAuthenticateHeader.getOpaque(); } else { opaque = authorizationHeader.getOpaque(); authorization.setUsername(username); authorization.setRealm(realm); authorization.setNonce(nonce); authorization.setParameter("uri", uri); authorization.setResponse(response); if (algorithm != null) { authorization.setAlgorithm(algorithm); authorization.setOpaque(opaque);
String user = authorization.getUsername(); if ( callId == null) throw new NullPointerException("Call ID is null!"); if ( authorization == null) throw new NullPointerException("Null authorization domain"); authorizationHeaders.put(callId, authHeaders); } else { String realm = authorization.getRealm(); for (ListIterator<AuthorizationHeader> li = authHeaders.listIterator(); li.hasNext();) { AuthorizationHeader authHeader = (AuthorizationHeader) li.next(); if ( realm.equals(authHeader.getRealm()) ) { li.remove();
authorization.setUsername(userCredentials.getUserName()); authorization.setRealm(authHeader.getRealm()); authorization.setNonce(authHeader.getNonce()); authorization.setParameter("uri", uri); authorization.setResponse(response); if (authHeader.getAlgorithm() != null) { authorization.setAlgorithm(authHeader.getAlgorithm()); authorization.setOpaque(authHeader.getOpaque()); authorization.setQop(qop); authorization.setCNonce(cnonce); authorization.setNonceCount(Integer.parseInt(nc_value)); authorization.setResponse(response);
String realm = authHeader.getRealm(); String username = authHeader.getUsername(); + " the realm: " + realm); String nonce = authHeader.getNonce(); URI uri = authHeader.getURI(); .println("DEBUG, DigestAuthenticationMethod, doAuthenticate(), HA2:" + HA2); String nonceCount = authHeader.getParameter("nc"); String cnonce = authHeader.getCNonce(); String qop = authHeader.getQop(); if (cnonce != null && nonceCount != null && qop != null && (qop.equalsIgnoreCase("auth") || qop.equalsIgnoreCase("auth-int"))) { mdbytes = messageDigest.digest(KD.getBytes()); String mdString = toHexString(mdbytes); String response = authHeader.getResponse(); System.out .println("DEBUG, DigestAuthenticateMethod, doAuthenticate(): "
AuthorizationHeader wwwAuthHeader = (AuthorizationHeader) authHeaderIterator.next(); MobicentsAuthInfoEntry authInfoEntry = getSipSession().getSipSessionSecurity().getCachedAuthInfos().get(wwwAuthHeader.getRealm()); nextNonce = getSipSession().getSipSessionSecurity().getNextNonce(); } else { nextNonce = wwwAuthHeader.getNonce();
protected void removeStaleAuthHeaders(WWWAuthenticateHeader responseAuthHeader) { String realm = responseAuthHeader.getRealm(); ListIterator<Header> authHeaderIterator = message.getHeaders(AuthorizationHeader.NAME); if(authHeaderIterator.hasNext()) { message.removeHeader(AuthorizationHeader.NAME); while(authHeaderIterator.hasNext()) { AuthorizationHeader wwwAuthHeader = (AuthorizationHeader) authHeaderIterator.next(); if(realm != null && !realm.equalsIgnoreCase(wwwAuthHeader.getRealm())) { message.addHeader(wwwAuthHeader); } } } authHeaderIterator = message.getHeaders(ProxyAuthorizationHeader.NAME); if(authHeaderIterator.hasNext()) { message.removeHeader(ProxyAuthorizationHeader.NAME); while(authHeaderIterator.hasNext()) { ProxyAuthorizationHeader proxyAuthHeader = (ProxyAuthorizationHeader) authHeaderIterator.next(); if(realm != null && !realm.equalsIgnoreCase(proxyAuthHeader.getRealm())) { message.addHeader(proxyAuthHeader); } } } }
authorization.setUsername(userCredentials.getUserName()); authorization.setRealm(authHeader.getRealm()); authorization.setNonce(authHeader.getNonce()); authorization.setParameter("uri", uri); authorization.setResponse(response); if (authHeader.getAlgorithm() != null) { authorization.setAlgorithm(authHeader.getAlgorithm()); authorization.setOpaque(authHeader.getOpaque()); authorization.setQop(qop); authorization.setCNonce(cnonce); authorization.setNonceCount(Integer.parseInt(nc_value)); authorization.setResponse(response);
qopList = wwwAuthenticateHeader.getQop(); } else { qopList = authorizationHeader.getQop(); algorithm = wwwAuthenticateHeader.getAlgorithm(); } else { algorithm = authorizationHeader.getAlgorithm(); realm = wwwAuthenticateHeader.getRealm(); } else { realm = authorizationHeader.getRealm(); scheme = wwwAuthenticateHeader.getScheme(); } else { scheme = authorizationHeader.getScheme(); opaque = wwwAuthenticateHeader.getOpaque(); } else { opaque = authorizationHeader.getOpaque(); authorization.setUsername(username); authorization.setRealm(realm); authorization.setNonce(nonce); authorization.setParameter("uri", uri); authorization.setResponse(response); if (algorithm != null) { authorization.setAlgorithm(algorithm); authorization.setOpaque(opaque);
qopList = wwwAuthenticateHeader.getQop(); } else { qopList = authorizationHeader.getQop(); algorithm = wwwAuthenticateHeader.getAlgorithm(); } else { algorithm = authorizationHeader.getAlgorithm(); realm = wwwAuthenticateHeader.getRealm(); } else { realm = authorizationHeader.getRealm(); scheme = wwwAuthenticateHeader.getScheme(); } else { scheme = authorizationHeader.getScheme(); opaque = wwwAuthenticateHeader.getOpaque(); } else { opaque = authorizationHeader.getOpaque(); authorization.setUsername(username); authorization.setRealm(realm); authorization.setNonce(nonce); authorization.setParameter("uri", uri); authorization.setResponse(response); if (algorithm != null) { authorization.setAlgorithm(algorithm); authorization.setOpaque(opaque);
qopList = wwwAuthenticateHeader.getQop(); } else { qopList = authorizationHeader.getQop(); algorithm = wwwAuthenticateHeader.getAlgorithm(); } else { algorithm = authorizationHeader.getAlgorithm(); realm = wwwAuthenticateHeader.getRealm(); } else { realm = authorizationHeader.getRealm(); scheme = wwwAuthenticateHeader.getScheme(); } else { scheme = authorizationHeader.getScheme(); opaque = wwwAuthenticateHeader.getOpaque(); } else { opaque = authorizationHeader.getOpaque(); authorization.setUsername(username); authorization.setRealm(realm); authorization.setNonce(nonce); authorization.setParameter("uri", uri); authorization.setResponse(response); if (algorithm != null) { authorization.setAlgorithm(algorithm); authorization.setOpaque(opaque);