Last active
August 29, 2015 13:56
-
-
Save marianogonzalez/8945304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<google-contacts:config-with-oauth name="Google_Contacts" consumerKey="${consumerKey}" consumerSecret="${consumerSecret}"> | |
<google-contacts:oauth-callback-config domain="localhost" localPort="${https.port}" path="oauth2callback" connector-ref="https.connector" /> | |
</google-contacts:config-with-oauth> | |
<objectstore:config name="tenantStore" partition="tenants" persistent="true" /> | |
<flow name="authorize"> | |
<https:inbound-endpoint path="authorize" port="${https.port}" exchange-pattern="request-response" /> | |
<flow-ref name="loadTenantInformation" /> | |
<google-contacts:authorize config-ref="Google_Contacts" /> | |
<choice> | |
<when expression="flowVars['GOOGLE_USER_EMAIL'] != flowVars['tenantInfo']['email']"> | |
<flow-ref name="rejectAndReportInvalidAuth" /> | |
</when> | |
<otherwise> | |
<logger message="successfully authorized tenant" /> | |
</otherwise> | |
</choice> | |
</flow> | |
<sub-flow> | |
<enricher target="#[flowVars['tenantInfo']]"> | |
<objectstore:retrieve config-ref="tenantStore" key="#[message.inboundProperties['cookies']['tenantId']]" /> | |
</enricher> | |
</sub-flow> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment