Box.V2.JWTAuth.BoxJWTAuth.BoxJWTAuth C# (CSharp) Method

BoxJWTAuth() public method

Constructor for JWT authentication
public BoxJWTAuth ( IBoxConfig boxConfig ) : Box.V2.Auth
boxConfig IBoxConfig Config contains information about client id, client secret, enterprise id, private key, private key password, public key id
return Box.V2.Auth
        public BoxJWTAuth(IBoxConfig boxConfig)
        {
            this.boxConfig = boxConfig;

            var pwf = new PEMPasswordFinder(this.boxConfig.JWTPrivateKeyPassword);
            AsymmetricCipherKeyPair key;
            using (var reader = new StringReader(this.boxConfig.JWTPrivateKey))
            {
                key = (AsymmetricCipherKeyPair)new PemReader(reader, pwf).ReadObject();
            }
            var rsa = DotNetUtilities.ToRSA((RsaPrivateCrtKeyParameters)key.Private);

#if NETSTANDARD1_4    
            this.credentials = new SigningCredentials(new RsaSecurityKey(rsa), SecurityAlgorithms.RsaSha256);
#else
            this.credentials = new SigningCredentials(new RsaSecurityKey(rsa), SecurityAlgorithms.RsaSha256Signature, SecurityAlgorithms.Sha256Digest);
#endif
        }
        /// <summary>