Class RemoteOAuthTimeStampProvider
java.lang.Object
br.ufsc.labsec.signature.tsa.providers.RemoteOAuthTimeStampProvider
- All Implemented Interfaces:
TimeStamp
public class RemoteOAuthTimeStampProvider extends Object implements TimeStamp
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRemoteOAuthTimeStampProvider.HttpUnauthorizedException -
Method Summary
Modifier and Type Method Description KeyStoreInformationconstructKeyStoreInformation()static RemoteOAuthTimeStampProvidergetInstance(URI url, URI oAuthUrl, String oAuthCredentials)Retorna a instância Singleton do RemoteOAuthTimeStampProvider.<Encod, Sig extends Signature<Encod>>
byte[]getTimeStamp(FileToBeSigned<? extends TSInformation<Encod,Sig>> fileToBeSigned, SignaturePolicyInterface signaturePolicyInterface, CadesSignatureComponent cadesSigComponent, boolean hasUnsignedAttributes, boolean hasCertificateValues, boolean hasRevocationValues)Retorna um carimbo de tempo pro conteúdo dadoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface br.ufsc.labsec.signature.tsa.TimeStamp
constructCadesInformation
-
Method Details
-
getInstance
public static RemoteOAuthTimeStampProvider getInstance(URI url, URI oAuthUrl, String oAuthCredentials)Retorna a instância Singleton do RemoteOAuthTimeStampProvider. Parâmetros são utilizados apenas na primeira chamada para inicialização.- Parameters:
timeStampComponent- Componente de TimeStmaptsaCredentials- Crendiciais para autenticação para obtenção do token de acessitsaURI- URI da TSAoAuthTokenEndpointURI- URI para o endpoint de obtenção do token de acesso- Returns:
- The singleton instance of RemoteOAuthTimeStampProvider.
-
getTimeStamp
public <Encod, Sig extends Signature<Encod>> byte[] getTimeStamp(FileToBeSigned<? extends TSInformation<Encod,Sig>> fileToBeSigned, SignaturePolicyInterface signaturePolicyInterface, CadesSignatureComponent cadesSigComponent, boolean hasUnsignedAttributes, boolean hasCertificateValues, boolean hasRevocationValues)Description copied from interface:TimeStampRetorna um carimbo de tempo pro conteúdo dado- Specified by:
getTimeStampin interfaceTimeStamp- Parameters:
fileToBeSigned- arquivo a ser assinadosignaturePolicyInterface- A política de assinaturacadesSigComponent- O componente de assinatura CAdEShasUnsignedAttributes- Indica se a assinatura possui atributos não assinadoshasCertificateValues- Indica se a assinatura possui o atributo CertificateValueshasRevocationValues- Indica se a assinatura possui o atributo RevocationValues- Returns:
- O carimbo de tempo pro conteúdo dado
-
constructKeyStoreInformation
- Specified by:
constructKeyStoreInformationin interfaceTimeStamp
-