DuoAuthenticationService.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:springboot-shiro-cas-mybatis 作者:
/**
 * Creates the duo authentication service.
 * @param duoIntegrationKey duo integration key
 * @param duoSecretKey duo secret key
 * @param duoApplicationKey duo application key
 * @param duoApiHost duo API host url
 */
@Autowired
public DuoAuthenticationService(@NotNull @Value("${cas.duo.integration.key:}") final String duoIntegrationKey,
                                @NotNull @Value("${cas.duo.secret.key:}") final String duoSecretKey,
                                @NotNull @Value("${cas.duo.application.key:}") final String duoApplicationKey,
                                @NotNull @Value("${cas.duo.api.host:}") final String duoApiHost) {

    if (StringUtils.isBlank(duoIntegrationKey)) {
        throw new IllegalArgumentException("Duo integration key cannot be blank");
    }
    if (StringUtils.isBlank(duoSecretKey)) {
        throw new IllegalArgumentException("Duo secret key cannot be blank");
    }
    if (StringUtils.isBlank(duoApplicationKey)) {
        throw new IllegalArgumentException("Duo application key cannot be blank");
    }
    if (StringUtils.isBlank(duoApiHost)) {
        throw new IllegalArgumentException("Duo api host cannot be blank");
    }

    this.duoIntegrationKey = duoIntegrationKey;
    this.duoSecretKey = duoSecretKey;
    this.duoApplicationKey = duoApplicationKey;
    this.duoApiHost = duoApiHost;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号