Class OAuthClient

java.lang.Object
eu.webtoolkit.jwt.auth.OAuthClient

public class OAuthClient
extends java.lang.Object
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:
AbstractUserDatabase
  • Constructor Summary

    Constructors 
    Constructor Description
    OAuthClient()
    Default constructor that creates an invalid OAuthClient.
    OAuthClient​(java.lang.String id, AbstractUserDatabase db)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    ClientSecretMethod getAuthMethod()
    Returns the client authentication method (see OIDC Core chapter 9)
    java.lang.String getClientId()
    Returns the ID used to identify the client with the OpenID Connect provider and user.
    java.lang.String getId()
    Returns the ID used to identify the client in the database.
    java.util.Set<java.lang.String> getRedirectUris()
    Returns the set of redirect URI's that are valid for this client.
    boolean isCheckValid()
    Returns whether the user is valid.
    boolean isConfidential()
    Returns whether the client is confidential or public.
    boolean verifySecret​(java.lang.String secret)
    Returns true if the given secret is correct for the given client.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait