apinf / platform

Apinf - Open source API management platform with multi proxy and protocol support
https://apinf.com/
European Union Public License 1.1
74 stars 33 forks source link

Generate & Store Login token #2789

Closed marla-singer closed 6 years ago

marla-singer commented 7 years ago

Description

For better integration with OpenAPI Designer and/or OpenAPI Space, APInf needs to provide User ID and Login token. Right now generation and storage of Login Token don't exist.

Goal

bajiat commented 7 years ago

@marla-singer Could you please add a description of the problem that needs to be solved with this issue?

marla-singer commented 7 years ago

@bajiat this issue will allow resolving the problem with authorization APInf users in OpenAPI Space/Designer. For correct working of authorization we need to provide User ID and Login token. Right now generation and storage of Login Token don't exist.

Link to documentation of OpenAPI Desginer: https://github.com/apinf/openapi-designer/blob/master/docs/INTEGRATION.md#apinf-login

deligence-dharmendra commented 6 years ago

Hi @marla-singer @matleppa Currently, I have got multiple login tokens for the same user, because of same user login with two different browsers at the same time. Can You suggest me how to manage loginTokens if multiple tokens exist for the same user?

resume: {…}
loginTokens: […]
0: Object { 
        when: Date 2017-12-21T10:20:15.341Z,
        hashedToken: "7pY0YZJipZdq0xuwjbRWgc0ESJ8s94/9m4v00Z+Qysk="
    }
1: Object { 
        when: Date 2017-12-21T12:44:24.265Z,
        hashedToken: "8rgnh0b8jYrSd5KRRdfXTV6Xd4mAX+N17zhPkj/Iqaw="
    }
length: 2

Please advise

marla-singer commented 6 years ago

Hi @deligence-dharmendra , I think the valid token can be one and that is the last added

deligence-dharmendra commented 6 years ago

Hi @marla-singer I have used browser side local storage for getting login token in place of user collection.I think it is the right way.What you think about it.

Please advise.