Package net.dona.doip.client
Class PrivateKeyAuthenticationInfo
- java.lang.Object
-
- net.dona.doip.client.PrivateKeyAuthenticationInfo
-
- All Implemented Interfaces:
AuthenticationInfo
public class PrivateKeyAuthenticationInfo extends java.lang.Object implements AuthenticationInfo
AnAuthenticationInfo
which provides an identity and a JWT signed by that entity's private key.
-
-
Constructor Summary
Constructors Constructor Description PrivateKeyAuthenticationInfo(java.lang.String clientId, java.security.PrivateKey privateKey)
PrivateKeyAuthenticationInfo(java.lang.String clientId, java.security.PrivateKey privateKey, java.lang.String asUserId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gson.JsonObject
getAuthentication()
Returns the authentication property to be supplied with the initial segment of DOIP requests.java.lang.String
getClientId()
Returns the clientId to be supplied with the initial segment of DOIP requests.
-
-
-
Constructor Detail
-
PrivateKeyAuthenticationInfo
public PrivateKeyAuthenticationInfo(java.lang.String clientId, java.security.PrivateKey privateKey)
-
PrivateKeyAuthenticationInfo
public PrivateKeyAuthenticationInfo(java.lang.String clientId, java.security.PrivateKey privateKey, java.lang.String asUserId)
-
-
Method Detail
-
getClientId
public java.lang.String getClientId()
Description copied from interface:AuthenticationInfo
Returns the clientId to be supplied with the initial segment of DOIP requests.- Specified by:
getClientId
in interfaceAuthenticationInfo
- Returns:
- the clientId to be supplied with the initial segment of DOIP requests
-
getAuthentication
public com.google.gson.JsonObject getAuthentication() throws DoipException
Description copied from interface:AuthenticationInfo
Returns the authentication property to be supplied with the initial segment of DOIP requests.- Specified by:
getAuthentication
in interfaceAuthenticationInfo
- Returns:
- the authentication property to be supplied with the initial segment of DOIP requests
- Throws:
DoipException
-
-