Class UakAuthenticator
java.lang.Object
com.veertu.ankaMgmtSdk.UakAuthenticator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.http.NameValuePair
Gets the Authorization header for the Anka Management API.static org.bouncycastle.asn1.pkcs.RSAPrivateKey
getRSAPrivateKey
(String key) Parses a UAK credential string and returns the RSA private key.
-
Constructor Details
-
UakAuthenticator
public UakAuthenticator(List<String> mgmtURLs, boolean skipTLSVerification, String rootCA, String id, String pemKey) Initializes a new instance of the UakAuthenticator class.- Parameters:
mgmtURLs
- the Anka Management API URLsskipTLSVerification
- whether to skip TLS verificationrootCA
- the root CA certificate in PEM formatid
- the UAK IDpemKey
- the RSA private key in PEM format
-
-
Method Details
-
getRSAPrivateKey
Parses a UAK credential string and returns the RSA private key. UAK can be either a PEM formatted private key or just a concatenated string without header and footer.- Parameters:
key
- the key string to parse- Returns:
- the RSA private key object
- Throws:
IllegalArgumentException
- if the key is null, empty, or not a valid RSA private key
-
getAuthorization
Gets the Authorization header for the Anka Management API.- Returns:
- the Authorization header
- Throws:
AnkaMgmtException
- if the request failsClientException
- if the request fails
-