Skip to content

Implement Janrain Capture and Janrain Engage auth provider #2436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 12, 2016
Merged

Implement Janrain Capture and Janrain Engage auth provider #2436

merged 8 commits into from
Aug 12, 2016

Conversation

AndrewLane
Copy link
Contributor

Fixes #2398

An addition to parse server to allow for authentication using Janrain. Janrain provides an Engage product as well as a Capture product, so there will be separate auth providers for each. It would be similar to Twitter, Facebook, etc. which are already implemented.

1) Janrain Engage Configuration:

The Janrain Engage API Key can be provided to Parse Server via configuration like:

{
    "appId": "...",
    "masterKey": "...",
    "databaseURI": "...",
    /* ... */
    "oauth": {
        "janrainengage": {
            "api_key": "your_api_key_here"
        }            
    }
}

2) Janrain Engage Auth Request

The POST to /users looks like:

{
    "authData": {
        "janrainengage": {
            "id": "social_id_here",
            "auth_token": "janrain_engage_auth_token_here"
        }
    }
}

3) Janrain Capture Configuration:

The Janrain Capture host can be provided to Parse Server via configuration like:

{
    "appId": "...",
    "masterKey": "...",
    "databaseURI": "...",
    /* ... */
    "oauth": {
        "janraincapture": {
            "janrain_capture_host": "your-janrain-capture-host.janraincapture.com"
        }            
    }
}

4) Janrain Capture Auth Request

The POST to /users looks like:

{
    "authData": {
        "janraincapture": {
            "id": "janrain_capture_id",
            "access_token": "janrain_capture_access_token"
        }
    }
}

@AndrewLane
Copy link
Contributor Author

Whoops, I added a breaking unit test. Sorry for the amateur hour. Will get that fixed.

* Modeled after the existing providers in /src/authDataManager/
* See also: https://docs.janrain.com/api/registration/entity/#entity
@codecov-io
Copy link

codecov-io commented Aug 1, 2016

Current coverage is 92.40% (diff: 82.19%)

Merging #2436 into master will decrease coverage by 0.07%

@@             master      #2436   diff @@
==========================================
  Files            93         95     +2   
  Lines         10629      10702    +73   
  Methods        1310       1327    +17   
  Messages          0          0          
  Branches       1728       1730     +2   
==========================================
+ Hits           9829       9889    +60   
- Misses          800        813    +13   
  Partials          0          0          

Powered by Codecov. Last update 6e0a25d...cd2f714

@ghost
Copy link

ghost commented Aug 1, 2016

@AndrewLane updated the pull request.

@ghost
Copy link

ghost commented Aug 1, 2016

@AndrewLane updated the pull request.

1 similar comment
@ghost
Copy link

ghost commented Aug 1, 2016

@AndrewLane updated the pull request.

module.exports = {
validateAppId: validateAppId,
validateAuthData: validateAuthData
};
Copy link
Contributor

@flovilmart flovilmart Aug 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add line break

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to clarify, the standard line break at the end of the file needs to be added?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, just added AndrewLane@b0fe257

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should i squash commits?

@flovilmart flovilmart added this to the 2.2.18 milestone Aug 9, 2016
# Conflicts:
#	src/authDataManager/janraincapture.js
#	src/authDataManager/janrainengage.js
@ghost
Copy link

ghost commented Aug 11, 2016

@AndrewLane updated the pull request.

@facebook-github-bot
Copy link

@AndrewLane updated the pull request.

@flovilmart
Copy link
Contributor

They are gonna Be squashed when merging

@flovilmart flovilmart merged commit 80de86c into parse-community:master Aug 12, 2016
@AndrewLane
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants