Class X509IdentityProvider
java.lang.Object
org.eclipse.milo.opcua.sdk.client.identity.X509IdentityProvider
- All Implemented Interfaces:
IdentityProvider
-
Constructor Summary
ConstructorsConstructorDescriptionX509IdentityProvider(X509Certificate certificate, PrivateKey privateKey) Construct anX509IdentityProviderwith a single certificate.X509IdentityProvider(X509Certificate certificate, Supplier<PrivateKey> privateKeySupplier) Construct anX509IdentityProviderwith a single certificate.X509IdentityProvider(List<X509Certificate> certificateChain, PrivateKey privateKey) Construct anX509IdentityProviderwith a certificate chain.X509IdentityProvider(List<X509Certificate> certificateChain, Supplier<PrivateKey> privateKeySupplier) Construct anX509IdentityProviderwith a certificate chain. -
Method Summary
Modifier and TypeMethodDescriptiongetIdentityToken(org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription endpoint, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString serverNonce) Return theUserIdentityTokenandSignatureData(if applicable for the token) to use when activating a session.
-
Constructor Details
-
X509IdentityProvider
Construct anX509IdentityProviderwith a single certificate.- Parameters:
certificate- theX509Certificateto authenticate with.privateKey- thePrivateKeycorresponding to the certificate.
-
X509IdentityProvider
Construct anX509IdentityProviderwith a certificate chain.- Parameters:
certificateChain- the certificate chain to authenticate with.privateKey- thePrivateKeycorresponding to the certificate.
-
X509IdentityProvider
Construct anX509IdentityProviderwith a single certificate.- Parameters:
certificate- theX509Certificateto authenticate with.privateKeySupplier- a supplier providing thePrivateKeycorresponding to the certificate.
-
X509IdentityProvider
public X509IdentityProvider(List<X509Certificate> certificateChain, Supplier<PrivateKey> privateKeySupplier) Construct anX509IdentityProviderwith a certificate chain.- Parameters:
certificateChain- the certificate chain to authenticate with.privateKeySupplier- a supplier providing thePrivateKeycorresponding to the certificate.
-
-
Method Details
-
getIdentityToken
public SignedIdentityToken getIdentityToken(org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription endpoint, org.eclipse.milo.opcua.stack.core.types.builtin.ByteString serverNonce) throws Exception Description copied from interface:IdentityProviderReturn theUserIdentityTokenandSignatureData(if applicable for the token) to use when activating a session.- Specified by:
getIdentityTokenin interfaceIdentityProvider- Parameters:
endpoint- theEndpointDescriptionbeing connected to.- Returns:
- a
SignedIdentityTokencontaining theUserIdentityTokenandSignatureData. - Throws:
Exception
-