public class AuthOptions
Represents a set of options for authentication, which can be passed to some methods such as
Webcom.authWithOAuth
.
Webcom.authWithOAuth
Modifier and Type | Class and Description |
---|---|
static class |
AuthOptions.Companion |
Modifier and Type | Field and Description |
---|---|
static AuthOptions.Companion |
Companion |
Modifier and Type | Method and Description |
---|---|
static AuthOptions |
Create()
Deprecated.
|
AuthOptions |
WithCustomParameter(java.lang.String key,
java.lang.Object value)
Adds (or removes) a custom parameter to this
class AuthOptions instance with a custom value. |
AuthOptions |
WithMCC()
Deprecated.
|
AuthOptions |
WithMCC(java.lang.String mcc)
Deprecated.
|
AuthOptions |
WithScope(java.lang.String scope)
Deprecated.
|
static AuthOptions |
create()
Creates an empty
class AuthOptions instance. |
boolean |
getForcesWebView() |
static java.lang.String |
getMobileCountryCode()
Retrieves the Mobile Country Code (MCC)
associated to the SIM card activated on the phone.
|
static java.lang.String |
getMobileNetworkCode()
Retrieves the Mobile Network Code (MNC)
associated to the SIM card activated on the phone.
|
AuthOptions |
setCustomParameter(java.lang.String key,
java.lang.Object value) |
void |
setForcesWebView(boolean p) |
AuthOptions |
setMCC() |
AuthOptions |
setMCC(java.lang.String mcc) |
AuthOptions |
setScope(java.lang.String scope)
Adds an OAuth2 "scope" option to this
class AuthOptions instance. |
java.lang.String |
toString() |
public static AuthOptions.Companion Companion
public boolean getForcesWebView()
public void setForcesWebView(boolean p)
@Deprecated @NotNull public AuthOptions WithMCC()
Adds the "mcc" option (Mobile Country Code) to
this class AuthOptions
instance with a value automatically guessed from the activated SIM card on the device.
This option is relevant for wassup-based implicit authentication.
class AuthOptions
instance updated, so that other With...
methods can be chainedWebcomException
- If no Mobile Country Code can be found from the SIM cardclass AuthOptions
@NotNull public AuthOptions setMCC()
@Deprecated @NotNull public AuthOptions WithMCC(@NotNull java.lang.String mcc)
Adds the "mcc" option (Mobile Country Code) to
this class AuthOptions
instance with a custom value.
This option is relevant for wassup-based implicit authentication.
class AuthOptions
instance updated, so that other With...
methods can be chainedclass AuthOptions
@NotNull public AuthOptions setMCC(@NotNull java.lang.String mcc)
@NotNull public AuthOptions setScope(@Nullable java.lang.String scope)
Adds an OAuth2 "scope" option to this class AuthOptions
instance.
scope
- An OAuth2 scope (value is OAuth2-provider-specific). If null
, remains this instanceunchanged (note that if no scope is specified within an class AuthOptions
instance, a minimalscope will be requested to the OAuth2 provider when passed toWebcom.authWithOAuth
)class AuthOptions
instance updated, so that other With...
methods can be chainedclass AuthOptions
@Deprecated @NotNull public AuthOptions WithScope(@Nullable java.lang.String scope)
@NotNull public AuthOptions WithCustomParameter(@NotNull java.lang.String key, @Nullable java.lang.Object value)
Adds (or removes) a custom parameter to this class AuthOptions
instance with a custom value.
key
- The name of the custom parameter to setvalue
- The value of the custom parameter to add, or null
to remove the custom parameterclass AuthOptions
instance updated, so that other With...
methods can be chainedclass AuthOptions
@NotNull public AuthOptions setCustomParameter(@NotNull java.lang.String key, @Nullable java.lang.Object value)
@NotNull public java.lang.String toString()
@JvmStatic @Deprecated @NotNull public static AuthOptions Create()
@JvmStatic @NotNull public static AuthOptions create()
Creates an empty class AuthOptions
instance.
class AuthOptions
instanceclass AuthOptions
@JvmStatic @NotNull public static java.lang.String getMobileCountryCode()
Retrieves the Mobile Country Code (MCC) associated to the SIM card activated on the phone.
@JvmStatic @NotNull public static java.lang.String getMobileNetworkCode()
Retrieves the Mobile Network Code (MNC) associated to the SIM card activated on the phone.