Package org.forgerock.http.filter.cors
Interface CorsPolicyProvider
public interface CorsPolicyProvider
A
CorsPolicyProvider
allows the CorsFilter
to lookup its configuration at runtime,
also based on contextual information.
It is the responsibility of the implementation to guarantee that the returned CorsPolicy
match the provided origin
.
-
Method Summary
Modifier and TypeMethodDescriptionfindApplicable
(Context context, String origin) Returns an optional CORS policy applicable in thiscontext
, for the givenorigin
.
-
Method Details
-
findApplicable
Returns an optional CORS policy applicable in thiscontext
, for the givenorigin
.If the implementation cannot make a choice if multiple policies would be applicable, it is expected to log a message and return an empty
Optional
.- Parameters:
context
- Runtime context (never null)origin
- Origin header value (never null)- Returns:
- an optional policy that can be applied to the origin, or empty.
-