jwt - Django API fronted by Azure API gateway -


i have django application stores user credentials , performs authorization , authentication. in process of breaking off front-end angular spa , converting backend rest api. django api live azure api app protected azure api gateway. remove authentication piece django , allow users sign in using openid connect through either google or microsoft account. happen this:

when user visits site, assuming have never registered app, have option sign in google account or microsoft account. if user decides sign in using google or microsoft account, (this i'm confused , why i'm posting here ... ) think happens api gateway performs authentication, generates json web token (jwt), , sends token django api. django receives jwt, decrypts it, , checks see if there user account matching email address in jwt. if there not user account, django add user user accounts table (not storing password). if there user matching email address, django allows user in.

all said, guess question(s) are:

  1. should authentication @ api management gateway or should @ azure web api?

  2. can use django's built-in authentication system want or not needed?

  3. am over-complicating of this? there easier way this? seems lot of work.

  4. is openid connect should using (instead of oauth2)? have no experience either.

azure api management not provide kind of jwt issuing mechanism, you'll have implement yourself. end points doing may or may not exposed via api management.

what possibly gets confused fact apim portal supports various indentity providers, twitter or google, sign api. these not application users, these api portal users.

what can apim gateway validate subsequent calls backend api supplied jwt token valid (using <validate-jwt> policy).

hope helps (a little @ least), martin


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -