nationalparkservice / places-api

An API, written in Node as Express middleware, built to work with the OSM API database schema. Used internally by Places.
The Unlicense
0 stars 0 forks source link

Add arc2places consumer #11

Closed regan-sarwas closed 9 years ago

regan-sarwas commented 9 years ago

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.

jimmyrocks commented 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

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/nationalparkservice/places-api/pull/11.

regan-sarwas commented 9 years ago

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

Patch Links:

— 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

jimmyrocks commented 9 years ago

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

Patch Links:

— 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 .