public class DefaultRestAuthenticationConfig extends Object implements RestAuthenticationConfig
Constructor and Description |
---|
DefaultRestAuthenticationConfig() |
Modifier and Type | Method and Description |
---|---|
String |
getGlobalRoles()
Define the global roles required for accessing endpoints methods, in case the method doesnt have specific required roles
It will fallback on this global roles
|
Map<String,String> |
getMethodRolesMap()
This is the roles mapped to endpoints
By default all methods are protected by the global roles
But you can define more granularity by providing roles for given endpoint methods
Multiple format supported for the keys:
- Method precise signature: org.apache.unomi.api.ContextResponse getContextJSON(java.lang.Stringjava.lang.Longjava.lang.String)
- Class name + method name: org.apache.unomi.rest.ContextJsonEndpoint.getContextJSON
- Method name only: getContextJSON
|
List<Pattern> |
getPublicPathPatterns()
This provide the patterns to identify public endpoints
The patterns will be tested against this format: "HTTP_METHOD HTTP_PATH_WITHOUT_CXS_PREFIX", like: "GET context.json"
sample pattern for identify GET, POST and OPTIONS on "/cxs/context.json" as public requests would be:
"(GET|POST|OPTIONS) context\\.json"
sample pattern for identify GET only on all paths starting by "/cxs/client/" as public requests would be:
"GET client/.*"
|
public List<Pattern> getPublicPathPatterns()
RestAuthenticationConfig
getPublicPathPatterns
in interface RestAuthenticationConfig
public Map<String,String> getMethodRolesMap()
RestAuthenticationConfig
getMethodRolesMap
in interface RestAuthenticationConfig
public String getGlobalRoles()
RestAuthenticationConfig
getGlobalRoles
in interface RestAuthenticationConfig
Copyright © 2014–2022 Apache Software Foundation. All rights reserved.