package com.dexels.oauth.api; /** * Scopes regulate the access to an API. Users can grant scopes to clients which * allow them to access endpoints within the API that require the scopes. * * Scopes can be optional or required by a client. If they're optional a user * can reject the scope for the client. The purpose of a required scope is that * users understand that a client needs access to specific endpoints to * function, without this access it cannot function at all. * * For example consider a public API with personalized endpoints, one of these * endpoints returns the friends of the user. This endpoint might require the * scope 'FRIENDS'. If the user grants the scope the client can access the * friend list of the user. * * During log in the user gets the question whether or not to accept the * available scopes, these scopes are bound to the token. There is no way to * change scope grants after login, other than logging out and logging in again. */ public interface Scope { public String getId(); }