Skip to content

通过web,在规定的有效期内可获取otp二次授权密码

Notifications You must be signed in to change notification settings

dyq94310/webotpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Otp web

通过wss,在规定的有效期内可获取otp二次授权密码

otp密码加解密

otp密码比较敏感,既然要上传GitHub,需做好加密 pom中引入jasypt-maven-plugin插件,方便加解密

# 加密
mvn jasypt:encrypt-value -Djasypt.encryptor.password="password" -Djasypt.plugin.value="value"
解密
mvn jasypt:decrypt-value -Djasypt.encryptor.password="password" -Djasypt.plugin.value="ENC(47GYBJezlwnAkSUsVpoJhN2PmUSxhy2+RzakDWkjUZyZFCyZc676w3znplmuf/0F)"

加密把密文写入配置文件中,密钥通过启动JVM参数传入

启动

密钥通过启动JVM参数传入:-Djasypt.encryptor.password=

接口列表

可自动刷新otp的主页

otp=987728 ,expires later :7second!!

技术列表

1 使用otp-java生成otp密码

<dependency>
    <groupId>com.github.bastiaanjansen</groupId>
    <artifactId>otp-java</artifactId>
    <version>1.3.2</version>
</dependency>

2 使用jasypt加密otp密码

<dependency>
    <groupId>com.github.ulisesbocchio</groupId>
    <artifactId>jasypt-spring-boot-starter</artifactId>
    <version>3.0.5</version>
</dependency>

use docker

cd [codepath]

# 构建image
docker build -t myotp:v1.1.19 .

# 启动 传入密钥
docker run -d -p 8090:8090 -e JAVA_OPTS='-Djasypt.encryptor.password=passwd'   --name otp myotp:v1.1.19 

项目地址

jaspty

otp-java

extract_otp_secrets

本项目

About

通过web,在规定的有效期内可获取otp二次授权密码

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published