/************************************************************************* * * * EJBCA Community: The OpenSource Certificate Authority * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package org.ejbca.core.protocol.acme; import java.util.LinkedHashMap; import org.ejbca.core.protocol.acme.AcmeIdentifier.AcmeIdentifierTypes; /** * An ACME Challenge is a proof a client needs to provide in order to be authorized to get a certificate for an identifier. * * PROCESSING constant in AcmeChallengeStatus ENUM is a requirement imposed by draft-ietf-acme-acme-12 and is preserved for * future use. * * @version $Id: AcmeChallenge.java 30434 2018-11-08 07:40:52Z andrey_s_helmes $ */ public interface AcmeChallenge { String getChallengeId(); void setChallengeId(String challengeId); String getAuthorizationId(); void setAuthorizationId(String authorizationId); String getType(); void setType(String type); String getUrl(); void setUrl(String url); AcmeChallengeStatus getStatus(); void setStatus(AcmeChallengeStatus status); String getValidated(); void setValidated(String validated); String getToken(); void setToken(String token); String getKeyAuthorization(); void setKeyAuthorization(String keyAuthorization); float getLatestVersion(); void upgrade(); LinkedHashMap getRawData(); public static enum AcmeChallengeType { DNS_HTTP_01(AcmeIdentifierTypes.DNS, "http-01"), DNS_DNS_01(AcmeIdentifierTypes.DNS, "dns-01"), ; private final AcmeIdentifierTypes acmeIdentifierType; private final String challengeType; private AcmeChallengeType(final AcmeIdentifierTypes acmeIdentifierType, final String challengeType) { this.acmeIdentifierType = acmeIdentifierType; this.challengeType = challengeType; } public AcmeIdentifierTypes getAcmeIdentifierType() { return acmeIdentifierType; } public String getChallengeType() { return challengeType; } } }