程序包 jmccc.microsoft
类 MicrosoftAuthenticator
java.lang.Object
jmccc.microsoft.MicrosoftAuthenticator
- 所有已实现的接口:
org.to2mbn.jmccc.auth.Authenticator
-
方法概要
修饰符和类型方法说明org.to2mbn.jmccc.auth.AuthInfoauth()Get auth infoGet token used in authenticator, which can be savedstatic MicrosoftAuthenticatorlogin(Consumer<MicrosoftVerification> callback) Create with new login This method will take a long time and block current thread, please run in new threadstatic MicrosoftAuthenticatorsession(MicrosoftSession session, Consumer<MicrosoftVerification> callback) Create with exist token This method will take a long time and block current thread, please run in new threadstatic voidsetClientId(String clientId) Set custom Microsoft Azure client id How to get client id
-
方法详细资料
-
session
public static MicrosoftAuthenticator session(MicrosoftSession session, Consumer<MicrosoftVerification> callback) throws org.to2mbn.jmccc.auth.AuthenticationException Create with exist token This method will take a long time and block current thread, please run in new thread- 参数:
session- token used in authenticatorcallback- a callback to display verification link and code to user- 返回:
- MicrosoftAuthenticator
- 抛出:
org.to2mbn.jmccc.auth.AuthenticationException
-
login
public static MicrosoftAuthenticator login(Consumer<MicrosoftVerification> callback) throws org.to2mbn.jmccc.auth.AuthenticationException Create with new login This method will take a long time and block current thread, please run in new thread- 参数:
callback- a callback to display verification link and code to user- 返回:
- MicrosoftAuthenticator
- 抛出:
org.to2mbn.jmccc.auth.AuthenticationException
-
auth
public org.to2mbn.jmccc.auth.AuthInfo auth()Get auth info- 指定者:
auth在接口中org.to2mbn.jmccc.auth.Authenticator- 返回:
- auth info
-
getSession
Get token used in authenticator, which can be saved- 返回:
- token used in authenticator
-
setClientId
Set custom Microsoft Azure client id How to get client id- 参数:
clientId- custom client id
-