Java Code Examples for javax.security.auth.login.Configuration#Parameters
The following examples show how to use
javax.security.auth.login.Configuration#Parameters .
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: ConfigFile.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 2
Source File: ConfigFile.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 3
Source File: ConfigFile.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 4
Source File: ConfigFile.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 5
Source File: ConfigFile.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 6
Source File: ConfigFile.java From Bytecoder with Apache License 2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 7
Source File: ConfigFile.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 8
Source File: ConfigFile.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 9
Source File: ConfigFile.java From hottub with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 10
Source File: ConfigFile.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 11
Source File: ConfigFile.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 12
Source File: ConfigFile.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 13
Source File: ConfigFile.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 14
Source File: ConfigFile.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public Spi(final Configuration.Parameters params) throws IOException { // call in a doPrivileged // // we have already passed the Configuration.getInstance // security check. also this class is not freely accessible // (it is in the "sun" package). try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { public Void run() throws IOException { if (params == null) { init(); } else { if (!(params instanceof URIParameter)) { throw new IllegalArgumentException ("Unrecognized parameter: " + params); } URIParameter uriParam = (URIParameter)params; url = uriParam.getURI().toURL(); init(); } return null; } }); } catch (PrivilegedActionException pae) { throw (IOException)pae.getException(); } // if init() throws some other RuntimeException, // let it percolate up naturally. }
Example 15
Source File: GetInstance.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private void doTestURI(Configuration c, Configuration.Parameters uriParam, int testnum) throws Exception { AppConfigurationEntry[] entries = c.getAppConfigurationEntry("four"); if (entries.length == 4 && MOD0.equals(entries[0].getLoginModuleName()) && AppConfigurationEntry.LoginModuleControlFlag.SUFFICIENT == entries[0].getControlFlag() && MOD1.equals(entries[1].getLoginModuleName()) && AppConfigurationEntry.LoginModuleControlFlag.REQUIRED == entries[1].getControlFlag() && MOD2.equals(entries[2].getLoginModuleName()) && AppConfigurationEntry.LoginModuleControlFlag.OPTIONAL == entries[2].getControlFlag() && MOD3.equals(entries[3].getLoginModuleName()) && AppConfigurationEntry.LoginModuleControlFlag.REQUIRED == entries[3].getControlFlag()) { System.out.println("test " + testnum + ".1 passed"); } else { throw new SecurityException("test " + testnum + ".1 failed"); } // test getProvider if ("SUN".equals(c.getProvider().getName())) { System.out.println("test " + testnum + " (getProvider) passed"); } else { throw new SecurityException("test " + testnum + " (getProvider) failed"); } // test getType if (JAVA_CONFIG.equals(c.getType())) { System.out.println("test " + testnum + " (getType) passed"); } else { throw new SecurityException("test " + testnum + " (getType) failed"); } // test getParameters if (uriParam.equals(c.getParameters())) { System.out.println("test " + testnum + " (getParameters) passed"); } else { throw new SecurityException("test " + testnum + " (getParameters) failed"); } }