程序包 jmccc.microsoft

类 MicrosoftAuthenticator

java.lang.Object
jmccc.microsoft.MicrosoftAuthenticator
所有已实现的接口:
org.to2mbn.jmccc.auth.Authenticator

public class MicrosoftAuthenticator extends Object implements org.to2mbn.jmccc.auth.Authenticator
  • 方法详细资料

    • 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 authenticator
      callback - 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

      public MicrosoftSession getSession()
      Get token used in authenticator, which can be saved
      返回:
      token used in authenticator
    • setClientId

      public static void setClientId(String clientId)
      Set custom Microsoft Azure client id How to get client id
      参数:
      clientId - custom client id