Closed regan-sarwas closed 9 years ago
Regan,
This looks great!
I think I might change how the oauths work from using an or to adding them all to an array and just checking "ArrayOfPossibleSigs.indexOf(origSig) >= 0", that will make it easier to expend to more consumers.
I'll try to get this code merged in and tested next week.
Jim
On Sat, Jun 6, 2015 at 2:35 AM, Regan Sarwas notifications@github.com wrote:
I think this should work to enable another consumer in the places api. we just need to create a consumer key/secret, and a session to test it. I’ll try testing tomorrow on my server.
In normal operation, I think the client needs to call /oauth/request_token, then send the request_token to Nate's server, so it can send the user id to /oauth/add_active_directory_user to trigger creation of the access token/secret, then the client can retrieve the token/secret with /oauth/access_token
...but I may be completely upside down.
You can view, comment on, or merge this pull request online at:
https://github.com/nationalparkservice/places-api/pull/11 Commit Summary
- Add arc2places consumer
File Changes
- M example.config.json https://github.com/nationalparkservice/places-api/pull/11/files#diff-0 (4)
- M src/oauth/authorizationRequest.js https://github.com/nationalparkservice/places-api/pull/11/files#diff-1 (3)
- M src/oauth/tools.js https://github.com/nationalparkservice/places-api/pull/11/files#diff-2 (9)
Patch Links:
- https://github.com/nationalparkservice/places-api/pull/11.patch
- https://github.com/nationalparkservice/places-api/pull/11.diff
— Reply to this email directly or view it on GitHub https://github.com/nationalparkservice/places-api/pull/11.
Thanks! The array of providers is a good idea, I also thought it would be good to put the consumer's host/key/secret in the database rather than a config file. The client_applications table is a close fit, but we are doing global consumers, and not client level consumers. Nevertheless if you like it, I can try and whip that up today.
On Sat, Jun 6, 2015 at 6:34 AM, Jim McAndrew notifications@github.com wrote:
Regan,
This looks great!
I think I might change how the oauths work from using an or to adding them all to an array and just checking "ArrayOfPossibleSigs.indexOf(origSig) >= 0", that will make it easier to expend to more consumers.
I'll try to get this code merged in and tested next week.
Jim
On Sat, Jun 6, 2015 at 2:35 AM, Regan Sarwas notifications@github.com wrote:
I think this should work to enable another consumer in the places api. we just need to create a consumer key/secret, and a session to test it. I’ll try testing tomorrow on my server.
In normal operation, I think the client needs to call /oauth/request_token, then send the request_token to Nate's server, so it can send the user id to /oauth/add_active_directory_user to trigger creation of the access token/secret, then the client can retrieve the token/secret with /oauth/access_token
...but I may be completely upside down.
You can view, comment on, or merge this pull request online at:
https://github.com/nationalparkservice/places-api/pull/11 Commit Summary
- Add arc2places consumer
File Changes
- M example.config.json https://github.com/nationalparkservice/places-api/pull/11/files#diff-0 (4)
- M src/oauth/authorizationRequest.js https://github.com/nationalparkservice/places-api/pull/11/files#diff-1 (3)
- M src/oauth/tools.js https://github.com/nationalparkservice/places-api/pull/11/files#diff-2 (9)
Patch Links:
- https://github.com/nationalparkservice/places-api/pull/11.patch
- https://github.com/nationalparkservice/places-api/pull/11.diff
— Reply to this email directly or view it on GitHub https://github.com/nationalparkservice/places-api/pull/11.
— Reply to this email directly or view it on GitHub https://github.com/nationalparkservice/places-api/pull/11#issuecomment-109585519 .
Regan Sarwas _GIS Programmer_National Park Service, Alaska Regional Office, GIS Team 240 W. Fifth Avenue, Anchorage, AK 99501 (907) 644-3548
_Alaska Region GIS Resources:_Intranet Site: http://165.83.62.205/rgr/akgis/ Helpdesk: akro_gis_helpdesk@nps.gov Web Maps/Apps: akrgis.nps.gov
The client_applications table isnt a bad idea, that's what its for, so we can look into it.
On Saturday, June 6, 2015, Regan Sarwas notifications@github.com wrote:
Thanks! The array of providers is a good idea, I also thought it would be good to put the consumer's host/key/secret in the database rather than a config file. The client_applications table is a close fit, but we are doing global consumers, and not client level consumers. Nevertheless if you like it, I can try and whip that up today.
On Sat, Jun 6, 2015 at 6:34 AM, Jim McAndrew <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
Regan,
This looks great!
I think I might change how the oauths work from using an or to adding them
all to an array and just checking "ArrayOfPossibleSigs.indexOf(origSig)
0", that will make it easier to expend to more consumers.
I'll try to get this code merged in and tested next week.
Jim
On Sat, Jun 6, 2015 at 2:35 AM, Regan Sarwas <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
I think this should work to enable another consumer in the places api. we just need to create a consumer key/secret, and a session to test it. I’ll try testing tomorrow on my server.
In normal operation, I think the client needs to call /oauth/request_token, then send the request_token to Nate's server, so it can send the user id to /oauth/add_active_directory_user to trigger creation of the access token/secret, then the client can retrieve the token/secret with /oauth/access_token
...but I may be completely upside down.
You can view, comment on, or merge this pull request online at:
https://github.com/nationalparkservice/places-api/pull/11 Commit Summary
- Add arc2places consumer
File Changes
- M example.config.json < https://github.com/nationalparkservice/places-api/pull/11/files#diff-0> (4)
- M src/oauth/authorizationRequest.js < https://github.com/nationalparkservice/places-api/pull/11/files#diff-1> (3)
- M src/oauth/tools.js < https://github.com/nationalparkservice/places-api/pull/11/files#diff-2> (9)
Patch Links:
- https://github.com/nationalparkservice/places-api/pull/11.patch
- https://github.com/nationalparkservice/places-api/pull/11.diff
— Reply to this email directly or view it on GitHub https://github.com/nationalparkservice/places-api/pull/11.
— Reply to this email directly or view it on GitHub < https://github.com/nationalparkservice/places-api/pull/11#issuecomment-109585519
.
Regan Sarwas _GIS Programmer_National Park Service, Alaska Regional Office, GIS Team 240 W. Fifth Avenue, Anchorage, AK 99501 (907) 644-3548
_Alaska Region GIS Resources:_Intranet Site: http://165.83.62.205/rgr/akgis/ Helpdesk: akro_gis_helpdesk@nps.gov javascript:_e(%7B%7D,'cvml','akro_gis_helpdesk@nps.gov'); Web Maps/Apps: akrgis.nps.gov
— Reply to this email directly or view it on GitHub https://github.com/nationalparkservice/places-api/pull/11#issuecomment-109614761 .
I think this should work to enable another consumer in the places api. we just need to create a consumer key/secret, and a session to test it. I’ll try testing tomorrow on my server.
In normal operation, I think the client needs to call /oauth/request_token, then send the request_token to Nate's server, so it can send the user id to /oauth/add_active_directory_user to trigger creation of the access token/secret, then the client can retrieve the token/secret with /oauth/access_token
...but I may be completely upside down.