java.net.Authenticator.RequestorType Java Examples
The following examples show how to use
java.net.Authenticator.RequestorType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HttpCallerInfo.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #2
Source File: HttpCallerInfo.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #3
Source File: HttpCallerInfo.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #4
Source File: HttpURLConnection.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #5
Source File: HttpURLConnection.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #6
Source File: HttpCallerInfo.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #7
Source File: HttpCallerInfo.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #8
Source File: HttpURLConnection.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #9
Source File: HttpCallerInfo.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #10
Source File: HttpURLConnection.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #11
Source File: HttpURLConnection.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #12
Source File: HttpURLConnection.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #13
Source File: HttpCallerInfo.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #14
Source File: HttpCallerInfo.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #15
Source File: HttpURLConnection.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #16
Source File: HttpURLConnection.java From hottub with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #17
Source File: HttpCallerInfo.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #18
Source File: HttpURLConnection.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #19
Source File: HttpURLConnection.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #20
Source File: HttpCallerInfo.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #21
Source File: HttpCallerInfo.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url, Authenticator a) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; authenticator = a; }
Example #22
Source File: HttpURLConnection.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private static PasswordAuthentication privilegedRequestPasswordAuthentication( final String host, final InetAddress addr, final int port, final String protocol, final String prompt, final String scheme, final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<PasswordAuthentication>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } }); }
Example #23
Source File: HttpCallerInfo.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url, Authenticator a) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; authenticator = a; }
Example #24
Source File: HttpCallerInfo.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #25
Source File: HttpCallerInfo.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Constructor an un-schemed object for site access. */ public HttpCallerInfo(URL url) { this.url= url; prompt = ""; host = url.getHost(); int p = url.getPort(); if (p == -1) { port = url.getDefaultPort(); } else { port = p; } InetAddress ia; try { ia = InetAddress.getByName(url.getHost()); } catch (Exception e) { ia = null; } addr = ia; protocol = url.getProtocol(); authType = RequestorType.SERVER; scheme = ""; }
Example #26
Source File: NegotiateAuthentication.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Constructor used for both WWW and proxy entries. * @param hci a schemed object. */ public NegotiateAuthentication(HttpCallerInfo hci) { super(RequestorType.PROXY==hci.authType ? PROXY_AUTHENTICATION : SERVER_AUTHENTICATION, hci.scheme.equalsIgnoreCase("Negotiate") ? NEGOTIATE : KERBEROS, hci.url, ""); this.hci = hci; }
Example #27
Source File: SimpleNetAuthenticator.java From wandora with GNU General Public License v3.0 | 5 votes |
@Override public PasswordAuthentication getPasswordAuthentication(String host, InetAddress addr, int port, String protocol, String prompt, String scheme, URL url, RequestorType reqType) { if(this.host.equalsIgnoreCase(host)) { return new PasswordAuthentication(user, password); } else return null; }
Example #28
Source File: HttpCallerInfo.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Constructor an un-schemed object for proxy access. */ public HttpCallerInfo(URL url, String host, int port) { this.url= url; this.host = host; this.port = port; prompt = ""; addr = null; protocol = url.getProtocol(); authType = RequestorType.PROXY; scheme = ""; }
Example #29
Source File: HttpCallerInfo.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Constructor an un-schemed object for proxy access. */ public HttpCallerInfo(URL url, String host, int port) { this.url= url; this.host = host; this.port = port; prompt = ""; addr = null; protocol = url.getProtocol(); authType = RequestorType.PROXY; scheme = ""; }
Example #30
Source File: NegotiateAuthentication.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Constructor used for both WWW and proxy entries. * @param hci a schemed object. */ public NegotiateAuthentication(HttpCallerInfo hci) { super(RequestorType.PROXY==hci.authType ? PROXY_AUTHENTICATION : SERVER_AUTHENTICATION, hci.scheme.equalsIgnoreCase("Negotiate") ? NEGOTIATE : KERBEROS, hci.url, ""); this.hci = hci; }