Class AcmeController
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.acme.AcmeController
-
- Direct Known Subclasses:
AccountController,AcmeCertificateController,AuthorizationController,ChallengeController,DirectoryController,NewAccountController,NewNonceController,NewOrderController,OrderController
@RestController public class AcmeController extends Object
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AcmeController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.web.util.UriComponentsBuilderaccountResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)org.springframework.web.util.UriComponentsBuilderauthorizationResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)protected org.springframework.http.HttpHeadersbuildNonceHeader()protected org.springframework.http.ResponseEntity<?>buildProblemResponseEntity(AcmeProblemException e)org.springframework.web.util.UriComponentsBuilderbuildUrlFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder, String path)org.springframework.web.util.UriComponentsBuildercertificateResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)org.springframework.web.util.UriComponentsBuilderchallengeResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)protected voidcheckNonce(org.jose4j.jwx.JsonWebStructure webStruct)voidcontactsFromRequest(AcmeAccount acctDao, AccountRequest updatedAcct)org.springframework.web.util.UriComponentsBuilderdirectoryResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)longgenerateId()generate new random identifiersStringgetBase64UrlEncodedRandom(int len)protected AcmeNoncegetNewNonce()PipelinegetPipelineForRealm(String realm)get the pipeline for a given realmprotected StringgetRandomChallenge()org.springframework.web.util.UriComponentsBuilderkeyChangeResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)URIlocationUriOfAuth(long authId, org.springframework.web.util.UriComponentsBuilder uriBuilder)URIlocationUriOfCertificate(long certId, org.springframework.web.util.UriComponentsBuilder uriBuilder)URIlocationUriOfOrder(long orderId, org.springframework.web.util.UriComponentsBuilder uriBuilder)URIlocationUriOfOrderFinalize(long orderId, org.springframework.web.util.UriComponentsBuilder uriBuilder)org.springframework.web.util.UriComponentsBuildernewAccountResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)org.springframework.web.util.UriComponentsBuildernewAuthorizationResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)org.springframework.web.util.UriComponentsBuildernewNonceResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)org.springframework.web.util.UriComponentsBuildernewOrderResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)org.springframework.web.util.UriComponentsBuilderorderResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)org.springframework.web.util.UriComponentsBuilderrevokeResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
-
-
Field Detail
-
NO_INSTANCE
public static final URI NO_INSTANCE
-
NO_DETAIL
public static final String NO_DETAIL
-
APPLICATION_JWS_VALUE
public static final String APPLICATION_JWS_VALUE
- See Also:
- Constant Field Values
-
APPLICATION_JOSE_JSON_VALUE
public static final String APPLICATION_JOSE_JSON_VALUE
- See Also:
- Constant Field Values
-
APPLICATION_PKIX_CERT_VALUE
public static final String APPLICATION_PKIX_CERT_VALUE
- See Also:
- Constant Field Values
-
APPLICATION_PEM_CERT_CHAIN_VALUE
public static final String APPLICATION_PEM_CERT_CHAIN_VALUE
- See Also:
- Constant Field Values
-
APPLICATION_X_PEM_CERT_CHAIN_VALUE
public static final String APPLICATION_X_PEM_CERT_CHAIN_VALUE
- See Also:
- Constant Field Values
-
APPLICATION_PEM_CERT_VALUE
public static final String APPLICATION_PEM_CERT_VALUE
- See Also:
- Constant Field Values
-
APPLICATION_PEM_FILE_VALUE
public static final String APPLICATION_PEM_FILE_VALUE
- See Also:
- Constant Field Values
-
APPLICATION_PKCS12_VALUE
public static final String APPLICATION_PKCS12_VALUE
- See Also:
- Constant Field Values
-
APPLICATION_PROBLEM_JSON
public static final org.springframework.http.MediaType APPLICATION_PROBLEM_JSON
-
APPLICATION_JOSE_JSON
public static final org.springframework.http.MediaType APPLICATION_JOSE_JSON
-
APPLICATION_JWS
public static final org.springframework.http.MediaType APPLICATION_JWS
-
APPLICATION_PKIX_CERT
public static final org.springframework.http.MediaType APPLICATION_PKIX_CERT
-
APPLICATION_PEM_CERT_CHAIN
public static final org.springframework.http.MediaType APPLICATION_PEM_CERT_CHAIN
-
APPLICATION_X_PEM_CERT_CHAIN
public static final org.springframework.http.MediaType APPLICATION_X_PEM_CERT_CHAIN
-
APPLICATION_PEM_CERT
public static final org.springframework.http.MediaType APPLICATION_PEM_CERT
-
APPLICATION_PEM_FILE
public static final org.springframework.http.MediaType APPLICATION_PEM_FILE
-
APPLICATION_PKCS12
public static final org.springframework.http.MediaType APPLICATION_PKCS12
-
DEFAULT_NONCE_VALID_DAYS
public static int DEFAULT_NONCE_VALID_DAYS
-
REPLAY_NONCE_HEADER
public static final String REPLAY_NONCE_HEADER
- See Also:
- Constant Field Values
-
HEADER_X_CA3S_FORWARDED_HOST
public static final String HEADER_X_CA3S_FORWARDED_HOST
- See Also:
- Constant Field Values
-
HEADER_X_CA3S_PROXY_ID
public static final String HEADER_X_CA3S_PROXY_ID
- See Also:
- Constant Field Values
-
HEADER_X_JWS_SIGNATURE
public static final String HEADER_X_JWS_SIGNATURE
- See Also:
- Constant Field Values
-
-
Method Detail
-
newAuthorizationResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder newAuthorizationResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
authorizationResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder authorizationResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
certificateResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder certificateResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
challengeResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder challengeResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
newNonceResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder newNonceResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
newAccountResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder newAccountResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
newOrderResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder newOrderResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
orderResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder orderResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
accountResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder accountResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
directoryResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder directoryResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
keyChangeResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder keyChangeResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
revokeResourceUriBuilderFrom
public org.springframework.web.util.UriComponentsBuilder revokeResourceUriBuilderFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder)
-
buildUrlFrom
public org.springframework.web.util.UriComponentsBuilder buildUrlFrom(org.springframework.web.util.UriComponentsBuilder uriComponentsBuilder, String path)
-
locationUriOfOrder
public URI locationUriOfOrder(long orderId, org.springframework.web.util.UriComponentsBuilder uriBuilder)
-
locationUriOfOrderFinalize
public URI locationUriOfOrderFinalize(long orderId, org.springframework.web.util.UriComponentsBuilder uriBuilder)
-
locationUriOfCertificate
public URI locationUriOfCertificate(long certId, org.springframework.web.util.UriComponentsBuilder uriBuilder)
-
locationUriOfAuth
public URI locationUriOfAuth(long authId, org.springframework.web.util.UriComponentsBuilder uriBuilder)
-
getPipelineForRealm
public Pipeline getPipelineForRealm(String realm)
get the pipeline for a given realm- Parameters:
realm-- Returns:
-
contactsFromRequest
public void contactsFromRequest(AcmeAccount acctDao, AccountRequest updatedAcct)
- Parameters:
acctDao-updatedAcct-
-
checkNonce
protected void checkNonce(org.jose4j.jwx.JsonWebStructure webStruct) throws org.jose4j.lang.JoseException, AcmeProblemException- Parameters:
webStruct-- Throws:
org.jose4j.lang.JoseExceptionAcmeProblemException
-
buildNonceHeader
protected org.springframework.http.HttpHeaders buildNonceHeader()
-
buildProblemResponseEntity
protected org.springframework.http.ResponseEntity<?> buildProblemResponseEntity(AcmeProblemException e)
- Parameters:
e-- Returns:
-
getNewNonce
protected AcmeNonce getNewNonce()
-
getRandomChallenge
protected String getRandomChallenge()
-
getBase64UrlEncodedRandom
public String getBase64UrlEncodedRandom(int len)
-
generateId
public long generateId()
generate new random identifiers- Returns:
-
-