All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.thebund1st.daming.boot.SmsVerificationCodeProperties Maven / Gradle / Ivy

package com.thebund1st.daming.boot;

import com.thebund1st.daming.core.MobilePhoneNumber;
import lombok.Data;
import org.springframework.boot.convert.DurationUnit;

import java.time.Duration;
import java.util.ArrayList;
import java.util.List;

import static java.time.temporal.ChronoUnit.SECONDS;
import static java.util.stream.Collectors.toList;


@Data
public class SmsVerificationCodeProperties {
    @DurationUnit(SECONDS)
    private Duration expires = Duration.ofSeconds(60);

    private List whitelist = new ArrayList<>();

    public List whitelist() {
        return getWhitelist().stream().map(MobilePhoneNumber::mobilePhoneNumberOf).collect(toList());
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy