How does Azure Active Directory authentication for Azure API Apps work? -
i'm trying call azure api app configured azure ad authentication. assume purposes of question cannot use azure sdk , need write code token , insert api request.*
i have established there 2 modes - 'client flow' , 'server flow', client flow entails following @ least 1 redirect issuer token, , server flow server you. since i'm talking doing in code, following redirects possible fiddly, i'd prefer use mode uri or uris visit known ahead of time , return content, rather redirecting. following diagram illustrates how gateway routes requests.
i think mode need client flow, go like:
- get access token identity provider (which what? how find out resides? format of request have send idp?)
- pass access token gateway (in format?)
- receive token in gateway response
- supply token in header when making api request (which header?)
how supposed this? azure documentation doesn't give enough detail how works, , expects users use sdk, hides happening.
the actual reason need called biztalk, uses wcf webhttpbinding call restful services. i'm writing custom behaviour insert token header request, need know how token should acquired. it's possible run arbitrary code in biztalk trying makes solution complicated, , config-only or mostly-config minimal, loosely-coupled code simpler solution
just want understand scenario better, because going use biztalk receive pipeline, scenario can simplified enabling customer authentication token right ? basic username , password api have hosted on cloud. biztalk want authenticate self tokens each ad user ?
to answer of questions
- get access token identity provider (which what? how find out resides? format of request have send idp?)
after have configured ad configuration, once have completed authentication, assuming using asp.net here, can find need claims on thread.currentprincipal, can convert claimsprincipal var claimsprincipal = thread.currentprincipal claimsprincipal; , find lot of information on object. name of user logged in, list of claims principal has etc. have not explored every avenue here, should starting point.
your api app running on process means have access these claims in api app code well.
i build custom pipeline in biztalk uses azure sdk authenciate , build scenario, bit complicated give more control on goes through pipeline when authentication fails permission issues , on.
Comments
Post a Comment