public abstract class SecurityContextProcessor extends java.lang.Object implements RequestProcessor
RequestProcessor.Request| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SCHEME_ID_KEY |
SECURITY_CONTEXT_KEY, SECURITY_PROC_METADATA_KEY, UTF8_CHARSET| Constructor and Description |
|---|
SecurityContextProcessor() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.util.Map<java.lang.String,java.lang.Object> |
getSecurityContextProperties(ExecutionContext.SecurityContext ctx) |
abstract boolean |
isSchemeSupported(java.lang.String requestedScheme) |
byte[] |
process(byte[] request,
java.util.Map<java.lang.String,java.lang.Object> metadata,
RequestProcessor.Request vapiRequest)
Processes and possibly modifies the provided request byte array
|
public static final java.lang.String SCHEME_ID_KEY
public byte[] process(byte[] request,
java.util.Map<java.lang.String,java.lang.Object> metadata,
RequestProcessor.Request vapiRequest)
RequestProcessorprocess in interface RequestProcessorrequest - must not be null. If text is passed as it MUST be UTF-8
encoded.metadata - provides additional metadata to the processor that will be
passed to the rest of the processor chain. Must not be null.
The content under the
RequestProcessor.SECURITY_PROC_METADATA_KEY key
will be put in the request's ExecutionContext.SecurityContext under
the same key i.e. will be accessible by the
authentication handlers.vapiRequest - the vapi request structure. Must not be null.public abstract boolean isSchemeSupported(java.lang.String requestedScheme)
requestedScheme - the authentication scheme that is used with the
current security contextpublic abstract java.util.Map<java.lang.String,java.lang.Object> getSecurityContextProperties(ExecutionContext.SecurityContext ctx)
ctx - the current security context. cannot be null.