Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public enum CommonOAuth2Provider
- Object
- Enum<CommonOAuth2Provider>
- CommonOAuth2Provider
ImplementsComparable<CommonOAuth2Provider>
The settings of the identity providers most applications sign in through, so that a registration needs only the id and secret the provider issued.
CommonOAuth2Provider.GITHUB.getBuilder("github").clientId(id).clientSecret(secret).build();Enum constants
GOOGLE | Google, with OpenID Connect. |
GITHUB | GitHub, which is OAuth2 without OpenID Connect: the user is read from its API, and named by the numeric id. |
MICROSOFT | Microsoft’s identity platform at its multi-tenant common endpoints, which accept accounts of any organisation and personal ones. |
APPLE | Sign in with Apple. |
Methods
Inherited methods
Enum constant details
GOOGLEGoogle, with OpenID Connect.
GITHUB
GITHUBGitHub, which is OAuth2 without OpenID Connect: the user is read from
its API, and named by the numeric id.
GitHub’s user says nothing of whether an address is verified, and may
show none at all. The verified ones are listed at /user/emails, which
the user:email scope asked for here opens; see
ClientRegistration.ProviderDetails.getUserEmailsUri.
MICROSOFT
MICROSOFTMicrosoft’s identity platform at its multi-tenant
common endpoints,
which accept accounts of any organisation and personal ones. Tokens are
issued under the address of the account’s own tenant, so the issuer is
held to the tenant template rather than to one address; an application
that admits one tenant only should also check the tid claim.APPLE
APPLESign in with Apple. Apple answers with a form the browser posts, and its
client secret is a token signed with the key Apple issued: give the
builder a
ClientRegistration.Builder.clientSecretSupplier made by
AppleClientSecret.Method details
values
public static CommonOAuth2Provider[] values()valueOf
public static CommonOAuth2Provider valueOf(String name)getBuilder
public abstract ClientRegistration.Builder getBuilder(String registrationId)A builder with the provider’s settings in it, wanting the client id and
secret.
of
public static CommonOAuth2Provider of(String name)The provider of this name, in any case, or null.