001/*
002 * acme4j - Java ACME client
003 *
004 * Copyright (C) 2021 Richard "Shred" K├Ârber
005 *   http://acme4j.shredzone.org
006 *
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
013 */
014package org.shredzone.acme4j.smime.challenge;
015
016import org.shredzone.acme4j.Login;
017import org.shredzone.acme4j.challenge.Challenge;
018import org.shredzone.acme4j.provider.ChallengeProvider;
019import org.shredzone.acme4j.provider.ChallengeType;
020import org.shredzone.acme4j.toolbox.JSON;
021
022/**
023 * A provider that generates {@link EmailReply00Challenge}. It is registered as Java
024 * service.
025 *
026 * @since 2.12
027 */
028@ChallengeType(EmailReply00Challenge.TYPE)
029public class EmailReply00ChallengeProvider implements ChallengeProvider {
030
031    @Override
032    public Challenge create(Login login, JSON data) {
033        return new EmailReply00Challenge(login, data);
034    }
035
036}