package com.dexels.oauth.api; import java.util.List; import java.util.Set; /** * Each OAuth Client is uniquely identified by its client id. The client secret * will be used to validate that it is more likely that requests containing * sensitive data originate from a trusted client device. * * A Client can define its description, which grant types it supports, to which * application it belongs, the Time To Live (in milliseconds) for the tokens, * which scopes it supports and which redirect url it accepts. * * A Client can be declared private, if it is NOT allowed to add this client to * a User by the user him/herself through OAuth. If a Client is private there * should be other means to link Users to it (e.g. directly in database, or * directly from backend) */ public interface Client { public String getClientId(); public String getSecret(); public String getTenant(); public String getRedirectURL(); public Set getAllowedGrantTypes(); public String getApplicationId(); public long getActivationTokenTTL(); public long getAccessTokenTTL(); public long getRefreshTokenTTL(); public long getAuthorizationTokenTTL(); public long getPasswordResetTokenTTL(); public long getHelpdeskTokenTTL(); // These scopes are required, without these scopes no token can be created public List getRequiredScopes(); // These scopes are optional, it is up to the user to grant access to the client public List getOptionalScopes(); public boolean isPrivate(); }