public abstract class SecurityContextProcessor extends Object implements RequestProcessor
RequestProcessor.Request
Modifier and Type | Field and Description |
---|---|
static String |
SCHEME_ID_KEY |
SECURITY_CONTEXT_KEY, SECURITY_PROC_METADATA_KEY, UTF8_CHARSET
Constructor and Description |
---|
SecurityContextProcessor() |
Modifier and Type | Method and Description |
---|---|
abstract Map<String,Object> |
getSecurityContextProperties(ExecutionContext.SecurityContext ctx) |
abstract boolean |
isSchemeSupported(String requestedScheme) |
byte[] |
process(byte[] request,
Map<String,Object> metadata,
RequestProcessor.Request vapiRequest)
Processes and possibly modifies the provided request byte array
|
public static final String SCHEME_ID_KEY
public byte[] process(byte[] request, Map<String,Object> metadata, RequestProcessor.Request vapiRequest)
RequestProcessor
process
in interface RequestProcessor
request
- 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(String requestedScheme)
requestedScheme
- the authentication scheme that is used with the
current security contextpublic abstract Map<String,Object> getSecurityContextProperties(ExecutionContext.SecurityContext ctx)
ctx
- the current security context. cannot be null.Copyright © 2016. All Rights Reserved.