<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 3:00 PM, Erik Jan de Wit <span dir="ltr">&lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>+1 that would make it more in sync with iOS and Windows, where we created profiled config:</div><div><br></div><div><a href="https://github.com/aerogear/aerogear-windows-oauth2/blob/master/aerogear-windows-oauth2/AccountManager.cs#L86" target="_blank">https://github.com/aerogear/aerogear-windows-oauth2/blob/master/aerogear-windows-oauth2/AccountManager.cs#L86</a></div><div><a href="https://github.com/aerogear/aerogear-ios-oauth2/blob/master/AeroGearOAuth2/AccountManager.swift#L23" target="_blank">https://github.com/aerogear/aerogear-ios-oauth2/blob/master/AeroGearOAuth2/AccountManager.swift#L23</a></div></div></blockquote><div><br></div><div>I think these _are_ good examples of specific configuration options for different 3rd party services</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5"><div><br></div><div><br></div><br><div><blockquote type="cite"><div>On 9 Mar,2015, at 14:42 , Bruno Oliveira &lt;<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>&gt; wrote:</div><br><div>Good morning, while writing our quickstarts, I found something that I<br>would like to change.<br><br>Currently to setup our OAuth2 providers we have to do something like<br>this:<br><br>AuthorizationManager.config(MODULE_NAME, OAuth2AuthorizationConfiguration.class)<br>        .setBaseURL(new URL(&quot;https://&quot;))<br>        .setAuthzEndpoint(AUTHZ_ENDPOINT)<br>        .setAccessTokenEndpoint(AUTHZ_TOKEN_ENDPOINT)<br>        .setAccountId(AUTHZ_ACCOOUNT_ID)<br>        .setClientId(AUTHZ_CLIENT_ID)<br>        .setClientSecret(AUTHZ_CLIENT_SECRET)<br>        .setRedirectURL(AUTHZ_REDIRECT_URL)<br>        .setRefreshEndpoint(AUTHZ_TOKEN_ENDPOINT)<br>        .addAdditionalAccessParam(Pair.create(&quot;response_type&quot;, &quot;code&quot;))<br>        .setScopes(Arrays.asList(&quot;photo_upload, publish_actions&quot;))<br>        .asModule();<br><br>Although, things like the url endpoint, access token endpoint, or the<br>module will most of time remain unchanged. Unless you switch from Facebook to<br>Keycloak for example. People don&#39;t care that much about these<br>urls, but which provider they want to connect.<br><br>So I would like to refactor the authz module from AGDroid, define the default values<br>for ommitted params and make the methods like setBaseURL for example,<br>alternative. Something like this:<br><br>AuthorizationManager.config(MODULE_NAME, OAuth2AuthorizationConfiguration.class)<br>        .setClientId(AUTHZ_CLIENT_ID)<br>        .setClientSecret(AUTHZ_CLIENT_SECRET)<br>        .asModule();<br><br>Based on the module name, we instantiate the respective module with the<br>default values already in.<br><br>Thoughts? Let me know if the idea is useless.<br><br><br>--<br><br>abstractj<br>PGP: 0x84DC9914<br>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></div></blockquote></div><br></div></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</div></div>