私は紺色の認証に奇妙な問題があります。これは1つのシナリオ(adalを使用して角型アプリケーションでログイン)ではなく、他のプラットフォームでは動作しません(asp.net web apiをロードし、swagger ui authorizeメカニズム経由でログインします)。Azure AD B2C oauth/OpenIdConnectの問題
302
<html>
<head>
<title>Object moved</title></head>
<body>
<h2>Object moved to <a href="http://localhost:49919/swagger/ui/oauth2redirect-html#error=server_error&error_description=AADB2C%3a+An+exception+has+occured.%0d%0aCorrelation+ID%3a+1816d2f8-aa74-4433-a7c0-d9c8fabebdb0%0d%0aTimestamp%3a+2017-10-27+13%3a46%3a08Z%0d%0a&state={ommitted}">here</a>.</h2>
</body>
</html>
基本的に例外が発生した私に言って:むしろunhelpfully返し
https://login.microsoftonline.com/te/{tenantid}/oauth2/authresp
エンドポイント:私はへのポストにそれを絞られています。
error_description = AADB2C例外が発生しました。
のCorrelationID = 1816d2f8-aa74-4433-a7c0-d9c8fabebdb0
タイムスタンプ= 2017年10月27日13時46分08秒
角度アプリは、正確に同じポストないが、それはしかし、リンクを返しますトークンID付き:
302
<html>
<head>
<title>Object moved</title>
</head>
<body>
<h2>Object moved to <a href="http://localhost:4200/#state={state -
ommitted}&id_token={id token - omitted}">here</a>.
</h2>
</body>
</html>
投稿には違いはありません。この1つは動作しません
POST https://login.microsoftonline.com/te/{tenant - omitted}/oauth2/authresp HTTP/1.1
Host: login.microsoftonline.com
Connection: keep-alive
Content-Length: 1595
Cache-Control: max-age=0
Origin: https://login.microsoftonline.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
DNT: 1
Referer: https://login.microsoftonline.com/{tenant - omitted}/oauth2/authorize?client_id={clientid - omitted}&redirect_uri=https:%2f%2flogin.microsoftonline.com%2fte%2f{tenant - omitted}%2foauth2%2fauthresp&response_type=id_token&response_mode=form_post&nonce={nonce}&state=StateProperties
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en;q=0.9,de-CH;q=0.8,de;q=0.7,fr-CH;q=0.6,fr;q=0.5,it-CH;q=0.4,it;q=0.3
Cookie: {cookie - omitted}=; x-ms-gateway-slice=005; stsservicecookie=cpim_te
id_token={omitted}
(Web APIをプロジェクトに闊歩UIから開始された)しかし、この記事ではありません:ポストとして
POST https://login.microsoftonline.com/te/{tenant - omitted}/oauth2/authresp HTTP/1.1
Host: login.microsoftonline.com
Connection: keep-alive
Content-Length: 1590
Cache-Control: max-age=0
Origin: https://login.microsoftonline.com
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
DNT: 1
Referer: https://login.microsoftonline.com/{tenant - omitted}/oauth2/authorize?client_id={clientid - omitted}&redirect_uri=https:%2f%2flogin.microsoftonline.com%2fte%2f{tenant - omitted}%2foauth2%2fauthresp&response_type=id_token&response_mode=form_post&nonce={nonce}&state=StateProperties
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en;q=0.9,de-CH;q=0.8,de;q=0.7,fr-CH;q=0.6,fr;q=0.5,it-CH;q=0.4,it;q=0.3
Cookie: {cookie - omitted}; x-ms-gateway-slice=003; stsservicecookie=cpim_te
id_token={omitted}
は問題がいずれかのクッキーのどこかに存在しなければならないほとんど同一であり、またはIDトークン(セキュリティ上の理由から私が提供することはできません)。両方の要求からのIDトークンをhttp://www.jwt.ioに貼り付けると、両方に存在する正しいクレームと同じ情報が私に与えられます。だから私はちょっと立ち往生していて、紺碧のチームの誰かが踏み込んで助けてくれることを願っていますか?あなたは/v2.0/ B2Cエンドポイントを呼び出していないよう
感謝
どちらの場合でも共有できるページまたはリクエストURLがありますか?そうでない場合は、リクエストURLをフィドラーリクエストから取得し、localhostをターゲットにしていても両方の場合に対応できますか? –
はい私はフィドラーからの完全なリクエストを提供できますが、機密情報が含まれているのでここに投稿することはできません – Magrangs
@OmerIqbal私はLinkedInにあなたを追加しました。ありがとう – Magrangs