google身份认证集成
# blzo-ex-google-auth google身份认证集成
引入此包可以在blzo中直接获得google身份认证能力。
# 引入
gradle
// https://mvnrepository.com/artifact/com.jdkhome.blzo/blzo-ex-google-auth
compile group: 'com.jdkhome.blzo', name: 'blzo-ex-google-auth', version: 0.3.0.1.RELEASE
1
2
2
maven
<!-- https://mvnrepository.com/artifact/com.jdkhome.blzo/blzo-ex-google-auth -->
<dependency>
<groupId>com.jdkhome.blzo</groupId>
<artifactId>blzo-ex-google-auth</artifactId>
<version>0.3.0.1.RELEASE</version>
</dependency>
1
2
3
4
5
6
2
3
4
5
6
# 使用
# 生成secret和二维码
// 注意这里的参数只能是数字/英文
GoogleAuthBean bean = GoogleAuth.generator("用户标识");
1
2
2
# 验证google验证码
Boolean result = GoogleAuth.validCode("secret", "code");
1
上次更新: 2020/06/11, 18:06:00