HTTPSession(String uri) throws HTTPException { init(HTTPAuthUtil.uriToAuthScope(uri), uri); }
@Deprecated static public void setGlobalCredentials(String url, Credentials creds) throws HTTPException { assert (url != null && creds != null); AuthScope scope = HTTPAuthUtil.uriToAuthScope(url); CredentialsProvider provider = new BasicCredentialsProvider(); provider.setCredentials(scope, creds); setGlobalCredentialsProvider(provider, scope); }
@Deprecated public HTTPSession setCredentialsProvider(String url, CredentialsProvider provider) throws HTTPException { assert (url != null && provider != null); AuthScope scope = HTTPAuthUtil.uriToAuthScope(url); setCredentialsProvider(provider, scope); return this; }
protected boolean sessionCompatible(URI otheruri) { AuthScope other = HTTPAuthUtil.uriToAuthScope(otheruri); return sessionCompatible(other); }
@Deprecated static public void setGlobalCredentialsProvider(String url, CredentialsProvider provider) throws HTTPException { assert (url != null && provider != null); AuthScope scope = HTTPAuthUtil.uriToAuthScope(url); setGlobalCredentialsProvider(provider, scope); }
@Deprecated public HTTPSession setCredentials(String url, Credentials creds) throws HTTPException { assert (creds != null); AuthScope scope = HTTPAuthUtil.uriToAuthScope(url); setCredentials(creds, scope); return this; }
static AuthScope uriToAuthScope(String surl) throws HTTPException { try { URI uri = HTTPUtil.parseToURI(surl); return uriToAuthScope(uri); } catch (URISyntaxException e) { throw new HTTPException(e); } }
setheaders(rb, this.headers); this.lastrequest = buildRequest(rb, this.settings); AuthScope methodscope = HTTPAuthUtil.uriToAuthScope(this.methodurl); AuthScope target = HTTPAuthUtil.authscopeUpgrade(session.getSessionScope(), methodscope);