@Immutable public final class Notary extends Object implements Authentication
| Constructor and Description |
|---|
Notary(KeyStoreParameters ksp) |
| Modifier and Type | Method and Description |
|---|---|
KeyStoreParameters |
parameters()
Returns the authentication parameters.
|
Artifactory |
sign(Codec codec,
Repository repository,
Object artifact)
Encodes and signs the given
artifact in the provided
repository and returns an artifactory for decoding it. |
Artifactory |
verify(Codec codec,
Repository repository)
Verifies the signature of the encoded artifact in the provided
repository and returns an artifactory for decoding it.
|
public Notary(KeyStoreParameters ksp)
public KeyStoreParameters parameters()
AuthenticationParametersProviderparameters in interface AuthenticationParametersProviderpublic Artifactory sign(Codec codec, Repository repository, @Nullable Object artifact) throws Exception
Authenticationartifact in the provided
repository and returns an artifactory for decoding it.
After calling this method, the repository typically gets encoded for
future decoding and verification.sign in interface Authenticationcodec - the codec for encoding the artifact.
It is an implementation detail whether or not encoding
null is supported or not.repository - the repository for encoding the artifact to.artifact - the nullable artifact to sign.
This may be null if and only if the codec
supports encoding it.Exceptionpublic Artifactory verify(Codec codec, Repository repository) throws Exception
AuthenticationAuthentication.sign(net.java.truelicense.core.codec.Codec, net.java.truelicense.core.auth.Repository, java.lang.Object), this is
typically done by decoding the repository itself.verify in interface Authenticationcodec - the codec for decoding the artifact.
It is an implementation detail whether or not decoding
null is supported or not.repository - the repository for decoding the artifact from.RepositoryIntegrityException - if the integrity of the repository
with its encoded artifact has been compromised.ExceptionCopyright © 2005–2017 Schlichtherle IT Services. All rights reserved.