/// <summary> /// constructer /// </summary> /// <param name="config"></param> public OciSession(ClientConfig config) { var streamConfig = new ClientConfigStream { AccountId = config.AccountId, DomainName = config.DomainName, Fingerprint = config.Fingerprint, HomeRegion = config.HomeRegion, IdentityDomain = config.IdentityDomain, Password = config.Password, PrivateKeyPassphrase = config.PrivateKeyPassphrase, TenancyId = config.TenancyId, UserId = config.UserId, UserName = config.UserName }; using (var key = File.OpenText(config.PrivateKey)) { streamConfig.PrivateKey = key; } OciSigner = new OciSigner( streamConfig.TenancyId, streamConfig.UserId, streamConfig.Fingerprint, streamConfig.PrivateKey, streamConfig.PrivateKeyPassphrase ); ClientConfigStream = streamConfig; }
/// <summary> /// Initialize Client /// </summary> /// <param name="config"></param> public void Initialize(ClientConfigStream config) { var signer = new OciSigner( config.TenancyId, config.UserId, config.Fingerprint, config.PrivateKey, config.PrivateKeyPassphrase); Initialize(config, signer); }
/// <summary> /// constructer /// </summary> /// <param name="config"></param> public OciSession(ClientConfigStream config) { OciSigner = new OciSigner( config.TenancyId, config.UserId, config.Fingerprint, config.PrivateKey, config.PrivateKeyPassphrase ); ClientConfigStream = config; }