Examples of ConsumerDetails


Examples of org.springframework.security.oauth.provider.ConsumerDetails

                }), with(same(getOAuthConsumerByConsumerKeyAction)));
                will(returnValue(consumer));
            }
        });

        ConsumerDetails result = sut.loadConsumerByConsumerKey("KEY");
        context.assertIsSatisfied();

        assertEquals("KEY", result.getConsumerKey());
        assertNotNull(result.getConsumerName());
        assertEquals("SECRET", ((SharedConsumerSecret) result.getSignatureSecret()).getConsumerSecret());
        GrantedAuthority[] auths = result.getAuthorities();
        assertEquals(2, auths.length);
        assertEquals("ROLE1", auths[0].getAuthority());
        assertEquals("ROLE2", auths[1].getAuthority());
    }
View Full Code Here

Examples of org.springframework.security.oauth.provider.ConsumerDetails

                oneOf(actionController).execute(with(any(ServiceActionContext.class)), with(any(ServiceAction.class)));
                will(throwException(new Exception("Failure")));
            }
        });

        ConsumerDetails result = sut.loadConsumerByConsumerKey("KEY");
        context.assertIsSatisfied();
    }
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.