私は以下のドキュメントに従っています: https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-how-to-use-server-sdk/カスタム認証を構築します。私は、次のコードスニペットでSginingKeyフォーマットが何であるか疑問に思って:Azure Appsカスタム認証SigningKey
app.UseAppServiceAuthentication(new AppServiceAuthenticationOptions()
{
// Here
SigningKey = ConfigurationManager.AppSettings["authSigningKey"],
ValidAudiences = new[] { ConfigurationManager.AppSettings["authAudience"] },
ValidIssuers = new[] { ConfigurationManager.AppSettings["authIssuer"] },
TokenHandler = config.GetAppServiceTokenHandler()
});
そして:
JwtSecurityToken token = AppServiceLoginHandler.CreateToken(
new Claim[] { new
Claim(JwtRegisteredClaimNames.Sub, assertion["username"]) },
// And here
mySigningKey,
myAppURL,
myAppURL,
TimeSpan.FromHours(24));
が、それは、Base64Stringますか?通常の文字列ですか?分散した例では、バイト配列がBase64Stringに変換されることがあります。
正しい文字列形式とは何ですか。また、テスト値を生成するにはどうすればよいですか?
ありがとうございます。あなたの答えは上記の答えに矛盾し、Base64を指定することができます。あなたはどうですか? – Adam
エンジニアと確認しました。この値は、16進数または16進数のいずれかになります。 Azureによって自動的に割り当てられた値は、16進数でエンコードされた文字列です。 –