public ParameterizableRequest < Void , AuthenticationException > getCodeRequest ( AuthenticationAPIClient apiClient , String connectionName ) { Log . d ( TAG , String . format ( "Generating Passwordless Code/Link request for connection %s" , connectionName ) ) ; ParameterizableRequest < Void , AuthenticationException > request ; if ( getMode ( ) == PasswordlessMode . EMAIL_CODE ) { request = apiClient . passwordlessWithEmail ( getEmailOrNumber ( ) , PasswordlessType . CODE ) ; } else if ( getMode ( ) == PasswordlessMode . EMAIL_LINK ) { request = apiClient . passwordlessWithEmail ( getEmailOrNumber ( ) , PasswordlessType . ANDROID_LINK ) ; } else if ( getMode ( ) == PasswordlessMode . SMS_CODE ) { request = apiClient . passwordlessWithSMS ( getEmailOrNumber ( ) , PasswordlessType . CODE ) ; } else { request = apiClient . passwordlessWithSMS ( getEmailOrNumber ( ) , PasswordlessType . ANDROID_LINK ) ; } return request . addParameter ( KEY_CONNECTION , connectionName ) ; }
Creates the ParameterizableRequest that will initiate the Passwordless Authentication flow .