사용자 지정 인증을 작성하려면 https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-how-to-use-server-sdk/ 설명서를 참조하십시오.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 그것을인가 나는 다음과 같은 코드 조각에서 SginingKey 형식은 무엇입니까 궁금? 일반 문자열? 나는 흩어져있는 예제에서 때때로 byte 배열이 Base64String으로 변환된다는 것을 알아 차렸다.
올바른 문자열 형식은 무엇이며 어떻게 테스트 값을 생성 할 수 있습니까?
답변 해 주셔서 감사합니다. 당신의 답은 당신이 Base64를 지정할 수 있다고 대답하는 것과 모순됩니다. 너 확실하니? – Adam
엔지니어와 점검했는데 값은 16 진수 또는 16 진수 중 하나 일 수 있습니다. Azure에 의해 자동으로 지정된 값은 16 진수로 인코딩 된 문자열입니다. –