Java 8 AuthPermission - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 AuthPermission class.

This code example shows how to use the following methods:
        assertEquals(in.getYear(), out.getYear());
    } 
 
    public void testAuthPermission() throws ExceptionAuthPermission in = new AuthPermission("foo");
        String json = MAPPER.writeValueAsString(in);
        assertNotNull(json);
         
        // actually, deserialization won't work by default. So let's just check 
        // some lexical aspects 
        if (!json.contains("\"name\":")) {
            fail("Unexpected JSON, missing 'name' property: "+json);
        } 
    } 
} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
    // location of login configuration file 
    private static final String LOGIN_CONFIG_URL_PREFIX = "login.config.url."; //$NON-NLS-1$
 
    // creates a AuthPermission object  
    private static final AuthPermission REFRESH_LOGIN_CONFIGURATION = new AuthPermission(
            "refreshLoginConfiguration"); //$NON-NLS-1$ 
 
    // set of application entry 
    private Map<String, List<AppConfigurationEntry>> configurations = Collections
            .synchronizedMap(new HashMap<String, List<AppConfigurationEntry>>());
 
    /** 
     * Default a constructor 
     */ 
    public DefaultConfiguration() { 
        super(); 
 
        init(); 
    } 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 * Default implementation for subject-based policy  
 */ 
@SuppressWarnings("deprecation") 
public class DefaultSubjectPolicy extends Policy {
 
    private static final AuthPermission REFRESH_POLICY = new AuthPermission("refreshPolicy"); //$NON-NLS-1$
 
    // System property for dynamically added policy location. 
    private static final String AUTH_SECURITY_POLICY = "java.security.auth.policy"; //$NON-NLS-1$
 
    // Prefix for numbered Policy locations specified in security.properties. 
    private static final String POLICY_URL_PREFIX = "auth.policy.url."; //$NON-NLS-1$
 
    // A flag to denote whether this policy object was initialized or not.  
    private boolean isInitialized;
 
    // A set of PolicyEntries constituting this Policy. 
    private Set<PolicyEntry> set;
 
    // A specific parser for a particular policy file format. 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
public class AuthPermissionTest extends SerializationTest { 
 
    @Override 
    protected Object[] getData() { 
        return new Object[] {new AuthPermission("name", "read")}; 
    } 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 * Default implementation for subject-based policy 
 */ 
@SuppressWarnings("deprecation") 
public class DefaultSubjectPolicy extends Policy { 
 
	private static final AuthPermission REFRESH_POLICY = new AuthPermission(
			"refreshPolicy"); //$NON-NLS-1$ 
 
	// System property for dynamically added policy location. 
	private static final String AUTH_SECURITY_POLICY = "java.security.auth.policy"; //$NON-NLS-1$
 
	// Prefix for numbered Policy locations specified in security.properties. 
	private static final String POLICY_URL_PREFIX = "auth.policy.url."; //$NON-NLS-1$
 
	// A flag to denote whether this policy object was initialized or not. 
	private boolean isInitialized;
 
	// A set of PolicyEntries constituting this Policy. 
	private Set<PolicyEntry> set;
 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
public class AuthPermissionTest extends SerializationTest { 
 
    @Override 
    protected Object[] getData() { 
        return new Object[] {new AuthPermission("name", "read")}; 
    } 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 AuthPermission Methods: