Skip to content
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

Connect microgateway to existing LB app that uses local user accounts and accessToken with scopes #91

Open
jdhrivas opened this issue Oct 28, 2017 · 0 comments

Comments

@jdhrivas
Copy link

jdhrivas commented Oct 28, 2017

Background
I've built an API with local user accounts (custom user model), and with custom accessToken model (custom attributes & scopes.)
For Ex. /login issues a limited access token with time limits, but when user "registered" in the app, the remote method behind /register auto-generates 4 eternal tokens with more broader scopes and custom attributes, like livemode true/false, type public/private. The public accessToken has very limited scope and is only allow to one action. The livemode attribute in the accessToken is later used to classify events. This property is inherit by the each model resulting from the use of the token, meaning that if you use a token with livemode = false, all those transactions are consider "test mode" transactions.

I also implemented custom end-points to rolled the auto-gen eternal token. At no point in the life of a user, the user is allow to generate more eternal tokens, they can generate timed tokens (/login) or rolled the existing eternal tokens created at the registration point.

Questions
I'm trying to use the microgateway to control authentication and security.

  1. How do I configure the microgateway to look at my user model and accessToken model for authentication?
    1.1 Do I need to remove these models from my app and re-implement in the microgateway?
    1.2 If the above is true: What is the equivalent of my the LB user model in the microgateway?
    1.3 Else: how do I go about integrating my existing logic?

I'll will really appreciate if someone can shine some light to these questions.
Thank for the hard-work put into LB and LB microgateway.
D.

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

No branches or pull requests

1 participant