Created
June 10, 2015 06:11
-
-
Save jeromyevans/1d2b7e390a699b26da2d to your computer and use it in GitHub Desktop.
Configure the endpoints for three-legged oauth with Xero
This file contains hidden or 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
// this is the user-accessed resource that initiates the authentication with xero. | |
// the user will eventually be redirected to Xero's authorize page | |
server.route({ | |
method: 'GET', | |
path: '/authenticate', | |
handler: function(request, reply) { | |
XeroClient.requestXeroRequestToken(request, reply); | |
} | |
}); | |
// this is the xero-accessed resource that provides details of the request token | |
// this route is specified by the oauth_callback_url | |
server.route({ | |
method: 'GET', | |
path: '/callback', | |
handler: function(request, reply) { | |
XeroClient.requestXeroAccessToken(request, reply); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment