private static string GetSignedClientAssertionUsingMsalInternal(string clientId, IDictionary <string, string> claims) { #if NET_CORE var manager = new Client.Platforms.netcore.NetCoreCryptographyManager(); #else var manager = new Client.Platforms.net45.NetDesktopCryptographyManager(); #endif var jwtToken = new Client.Internal.JsonWebToken(manager, clientId, TestConstants.ClientCredentialAudience, claims); var clientCredential = ClientCredentialWrapper.CreateWithCertificate(GetCertificate(), claims); return(jwtToken.Sign(clientCredential, false)); }
private static string GetSignedClientAssertionUsingMsalInternal(string clientId, IDictionary <string, string> claims) { #if NET_CORE var manager = new Client.Platforms.netcore.NetCoreCryptographyManager(); #else var manager = new Client.Platforms.net45.NetDesktopCryptographyManager(); #endif var jwtToken = new Client.Internal.JsonWebToken(manager, clientId, TestConstants.ClientCredentialAudience, claims); var cert = ConfidentialAppSettings.GetSettings(Cloud.Public).GetCertificate(); return(jwtToken.Sign(cert, Base64UrlHelpers.Encode(cert.GetCertHash()), true)); }