Class ScriptableResourceAccess
java.lang.Object
org.forgerock.openig.script.AbstractScriptableHeapObject<Set>
org.forgerock.openig.filter.oauth2.ScriptableResourceAccess
- All Implemented Interfaces:
Closeable,AutoCloseable,ResourceAccess
public class ScriptableResourceAccess
extends AbstractScriptableHeapObject<Set>
implements ResourceAccess
A scriptable resource access. This resource access acts as a simple wrapper around the
scripting engine. Scripts are provided with the bindings provided by
AbstractScriptableHeapObject.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCreates and initializes a scriptable object in a heap environment.Nested classes/interfaces inherited from class org.forgerock.openig.script.AbstractScriptableHeapObject
AbstractScriptableHeapObject.AbstractScriptableHeaplet<V> -
Method Summary
Modifier and TypeMethodDescriptiongetRequiredScopes(Context context, Request request) Returns the scopes required to access the resource.Methods inherited from class org.forgerock.openig.script.AbstractScriptableHeapObject
close, runScript, runScriptAsync, setArgs, setClientHandler
-
Method Details
-
getRequiredScopes
Description copied from interface:ResourceAccessReturns the scopes required to access the resource.- Specified by:
getRequiredScopesin interfaceResourceAccess- Parameters:
context- The current context which might be used to retrieve required scopes.request- The current OAuth2 request which might be used to retrieve required scopes.- Returns:
- A promise containing the scopes required to access the resource. The promise may be
completed with a
ResponseExceptionIf an error occurred while resolving scope set. Should never returnnull.
-