Package com.venafi.vcert.sdk
Class VCertTknClient
- java.lang.Object
-
- com.venafi.vcert.sdk.VCertClient
-
- com.venafi.vcert.sdk.VCertTknClient
-
- All Implemented Interfaces:
Connector,IPMConnector,ISSHConnector,TokenConnector
public class VCertTknClient extends VCertClient implements TokenConnector
-
-
Field Summary
-
Fields inherited from class com.venafi.vcert.sdk.VCertClient
connector
-
-
Constructor Summary
Constructors Constructor Description VCertTknClient(Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConnectorcreateConnector(Config config)TokenInfogetAccessToken()returns a new access token.TokenInfogetAccessToken(Authentication auth)returns a new access token.TokenInfogetTokenInfo()TokenInforefreshAccessToken(String applicationId)this is for refreshing a token.intrevokeAccessToken()-
Methods inherited from class com.venafi.vcert.sdk.VCertClient
authenticate, authorize, generateRequest, getCredentials, getPolicy, getType, getVendorAndProductName, importCertificate, isEmptyCredentials, ping, readPolicyConfiguration, readZoneConfiguration, renewCertificate, requestCertificate, requestCertificate, requestSshCertificate, retrieveCertificate, retrieveSshCertificate, retrieveSshConfig, revokeCertificate, setBaseUrl, setPolicy, setVendorAndProductName, setZone
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.venafi.vcert.sdk.connectors.Connector
authenticate, authorize, generateRequest, getCredentials, getType, getVendorAndProductName, importCertificate, isEmptyCredentials, ping, readZoneConfiguration, renewCertificate, requestCertificate, requestCertificate, retrieveCertificate, revokeCertificate, setBaseUrl, setVendorAndProductName, setZone
-
Methods inherited from interface com.venafi.vcert.sdk.connectors.IPMConnector
getPolicy, readPolicyConfiguration, setPolicy
-
Methods inherited from interface com.venafi.vcert.sdk.connectors.ISSHConnector
requestSshCertificate, retrieveSshCertificate, retrieveSshConfig
-
-
-
-
Constructor Detail
-
VCertTknClient
public VCertTknClient(Config config) throws VCertException
- Throws:
VCertException
-
-
Method Detail
-
createConnector
protected Connector createConnector(Config config) throws VCertException
- Overrides:
createConnectorin classVCertClient- Throws:
VCertException
-
getTokenInfo
public TokenInfo getTokenInfo() throws VCertException
- Specified by:
getTokenInfoin interfaceTokenConnector- Throws:
VCertException
-
getAccessToken
public TokenInfo getAccessToken(Authentication auth) throws VCertException
Description copied from interface:TokenConnectorreturns a new access token.- Specified by:
getAccessTokenin interfaceTokenConnector- Parameters:
auth- authentication info- Returns:
- the new token.
- Throws:
VCertException- throws this exception when authentication info is null.
-
getAccessToken
public TokenInfo getAccessToken() throws VCertException
Description copied from interface:TokenConnectorreturns a new access token. This method uses theAuthenticationobject passed earlier with theConfigobject.- Specified by:
getAccessTokenin interfaceTokenConnector- Returns:
- the new token.
- Throws:
VCertException- throws this exception when authentication info is null.
-
refreshAccessToken
public TokenInfo refreshAccessToken(String applicationId) throws VCertException
Description copied from interface:TokenConnectorthis is for refreshing a token.- Specified by:
refreshAccessTokenin interfaceTokenConnector- Parameters:
applicationId- the application id.- Returns:
- a complete info about the new access token, refresh token, expires.
- Throws:
VCertException
-
revokeAccessToken
public int revokeAccessToken() throws VCertException- Specified by:
revokeAccessTokenin interfaceTokenConnector- Returns:
- 1 if the access token was revoked and 0 if not.
- Throws:
VCertException
-
-