Package org.agorava.api.oauth.application

Examples of org.agorava.api.oauth.application.OAuthAppSettingsBuilder


*/
public class PropertySettingsBuilderTest {
    @Test
    public void testDefaultBuild() {

        OAuthAppSettingsBuilder builderOAuthApp = new PropertyOAuthAppSettingsBuilder();
        OAuthAppSettings settings = builderOAuthApp.build();
        Assert.assertEquals(settings.getCallback(), "/dummyCallback");

    }
View Full Code Here


        if (annotatedMember.isAnnotationPresent(OAuthApplication.class)) {
            if (annotatedMember instanceof AnnotatedField) {

                final OAuthApplication app = annotatedMember.getAnnotation(OAuthApplication.class);

                OAuthAppSettingsBuilder builderOAuthApp = null;
                Class<? extends OAuthAppSettingsBuilder> builderClass = app.builder();
                if (builderClass == OAuthAppSettingsBuilder.class) {
                    log.info("You didn't provide a Concrete OAuthAppSettingsBuilder class using the default " +
                            "PropertyOAuthAppSettingsBuilder class");
                    builderClass = PropertyOAuthAppSettingsBuilder.class;
                }
                try {
                    builderOAuthApp = builderClass.newInstance();
                } catch (Exception e) {
                    pp.addDefinitionError(new AgoravaException("Unable to create Settings Builder with class " +
                            builderClass, e));
                }

                builderOAuthApp.qualifier(qual)
                        .params(app.params());

                pp.setProducer(new OAuthAppSettingsProducerWithBuilder(builderOAuthApp, qual));
            } else
                pp.addDefinitionError(new AgoravaException("@OAuthApplication are only supported on Field. Agorava cannot " +
View Full Code Here

TOP

Related Classes of org.agorava.api.oauth.application.OAuthAppSettingsBuilder

Copyright © 2018 www.massapicom. 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.