Examples of someAdminMethod()


Examples of org.springframework.security.access.annotation.BusinessService.someAdminMethod()

    // SEC-1387
    @Test(expected=AuthenticationCredentialsNotFoundException.class)
    public void targetIsSerializableBeforeUse() throws Exception {
        BusinessService chompedTarget = (BusinessService) serializeAndDeserialize(target);
        chompedTarget.someAdminMethod();
    }

    @Test(expected=AccessDeniedException.class)
    public void targetIsSerializableAfterUse() throws Exception {
        try {
View Full Code Here

Examples of org.springframework.security.access.annotation.BusinessService.someAdminMethod()

        } catch (AuthenticationCredentialsNotFoundException expected) {
        }
        SecurityContextHolder.getContext().setAuthentication(new TestingAuthenticationToken("u","p","ROLE_A"));

        BusinessService chompedTarget = (BusinessService) serializeAndDeserialize(target);
        chompedTarget.someAdminMethod();
    }

    private Object serializeAndDeserialize(Object o) throws IOException, ClassNotFoundException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.