C# Класс Conjur.Client

Conjur API client.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AuthenticatedRequest ( string path ) : WebRequest

Create an authenticated WebRequest for the specified path.

Client ( string applianceUri ) : System

Initializes a new instance of the Conjur.Client class.

CreateHost ( string name, string hostFactoryToken ) : Host

Creates a host using a host factory token.

GetAccountName ( ) : string

Gets the name of the Conjur organization account.

LogIn ( NetworkCredential credential ) : string

Logs in using a password. Sets Authenticator Credential

LogIn ( string userName, string password ) : string

Logs in using a password. Sets Authenticator Credential

Request ( string path ) : WebRequest

Create a WebRequest for the specified path.

Resource ( string kind, string id ) : Resource

Creates an object representing a Conjur resource.

ValidateBaseUri ( ) : Uri

Validates the appliance base URI. Tries to connect to /info; if not successful, try again adding an /api prefix. Also sets up certificate validation.

Variable ( string name ) : Variable

Creates an object representing the named variable.

Приватные методы

Метод Описание
ApplyAuthentication ( WebRequest webRequest ) : WebRequest
Info ( ) : ServerInfo

Get the server info.

NormalizeBaseUri ( string uri ) : Uri

Normalizes the base URI, removing double slashes and adding a trailing slash, as necessary.

ValidateCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool

Validates the Conjur appliance certificate. RemoteCertificateValidationCallback

Описание методов

AuthenticatedRequest() публичный Метод

Create an authenticated WebRequest for the specified path.
public AuthenticatedRequest ( string path ) : WebRequest
path string Path, NOT including the leading slash.
Результат System.Net.WebRequest

Client() публичный Метод

Initializes a new instance of the Conjur.Client class.
public Client ( string applianceUri ) : System
applianceUri string Appliance URI.
Результат System

CreateHost() публичный Метод

Creates a host using a host factory token.
public CreateHost ( string name, string hostFactoryToken ) : Host
name string Name of the host to create.
hostFactoryToken string Host factory token.
Результат Host

GetAccountName() публичный Метод

Gets the name of the Conjur organization account.
public GetAccountName ( ) : string
Результат string

LogIn() публичный Метод

Logs in using a password. Sets Authenticator Credential
public LogIn ( NetworkCredential credential ) : string
credential System.Net.NetworkCredential The credential of user name and password, /// where user name is for example "bob" or "host/jenkins".
Результат string

LogIn() публичный Метод

Logs in using a password. Sets Authenticator Credential
public LogIn ( string userName, string password ) : string
userName string User name to log in as (for example "bob" /// or "host/example.com".
password string Password of the user.
Результат string

Request() публичный Метод

Create a WebRequest for the specified path.
public Request ( string path ) : WebRequest
path string Path, NOT including the leading slash.
Результат System.Net.WebRequest

Resource() публичный Метод

Creates an object representing a Conjur resource.
public Resource ( string kind, string id ) : Resource
kind string Resource kind.
id string Resource identifier.
Результат Resource

ValidateBaseUri() публичный Метод

Validates the appliance base URI. Tries to connect to /info; if not successful, try again adding an /api prefix. Also sets up certificate validation.
public ValidateBaseUri ( ) : Uri
Результат System.Uri

Variable() публичный Метод

Creates an object representing the named variable.
public Variable ( string name ) : Variable
name string The variable name.
Результат Variable