Package eu.webtoolkit.jwt.auth
Class OAuthClient
java.lang.Object
eu.webtoolkit.jwt.auth.OAuthClient
OAuth 2.0 client implementing OpenID Connect, a.k.a. relying party.
This class represents a client. It is a value class that stores only the id and a reference to
an AbstractUserDatabase to access its properties.
An object can point to a valid client, or be invalid. Invalid clients are typically used as return value for database queries which did not match with an existing client.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor that creates an invalidOAuthClient.OAuthClient(String id, AbstractUserDatabase db) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the client authentication method (see OIDC Core chapter 9)Returns the ID used to identify the client with the OpenID Connect provider and user.getId()Returns the ID used to identify the client in the database.Returns the set of redirect URI's that are valid for this client.booleanReturns whether the user is valid.booleanReturns whether the client is confidential or public.booleanverifySecret(String secret) Returns true if the given secret is correct for the given client.
-
Constructor Details
-
OAuthClient
public OAuthClient()Default constructor that creates an invalidOAuthClient.- See Also:
-
OAuthClient
Constructor.Creates a client with id
id, and whose information is stored in thedatabase.
-
-
Method Details
-
isCheckValid
public boolean isCheckValid()Returns whether the user is valid.A invalid user is a sentinel value returned by methods that query the database but could not identify a matching user.
-
getId
Returns the ID used to identify the client in the database.This returns the id that uniquely identifies the user, and acts as a "primary key" to obtain other information for the user in the database.
-
getClientId
Returns the ID used to identify the client with the OpenID Connect provider and user.This is the id that the client uses to identify itself with the identity provider.
- See Also:
-
verifySecret
Returns true if the given secret is correct for the given client. -
getRedirectUris
Returns the set of redirect URI's that are valid for this client.- See Also:
-
isConfidential
public boolean isConfidential()Returns whether the client is confidential or public.- See Also:
-
getAuthMethod
Returns the client authentication method (see OIDC Core chapter 9)- See Also:
-