public class ServerAuthorizationComponentsFactory extends Object
BokuHttpAuthFilter and AuthorizationContextProvider must share state, and so
must be wired up correctly with the same common dependencies. This class helps you do that correctly.KeyProvider, and then use the various accessors to get instances of
the various components to wire into your app.BokuHttpAuthFilter, and
then use the static instance accessible via getInstance().getInstance() is called for the first time or they will have no effect!
See documentation on BokuHttpAuthFilter.init(javax.servlet.FilterConfig) for details of configuration parameters.| Modifier and Type | Field and Description |
|---|---|
static String |
KEYPROVIDER_CUSTOM_FACTORY_METHOD_KEY |
static String |
KEYPROVIDER_P12_FILE_DEFAULT |
static String |
KEYPROVIDER_P12_FILE_KEY |
static String |
KEYPROVIDER_P12_PASSWORD_KEY |
static String |
KEYPROVIDER_TYPE_CUSTOM |
static String |
KEYPROVIDER_TYPE_DEFAULT |
static String |
KEYPROVIDER_TYPE_KEY |
static String |
KEYPROVIDER_TYPE_PKCS12 |
| Constructor and Description |
|---|
ServerAuthorizationComponentsFactory(KeyProvider keyProvider)
Wire up server components using the regular
BasicStringSignerImpl and your given KeyProvider
implementation. |
ServerAuthorizationComponentsFactory(StringSigner stringSigner)
Wire up server components using a custom
StringSigner implementation. |
| Modifier and Type | Method and Description |
|---|---|
AuthorizationContextProvider |
getAuthorizationContextProvider()
Get the
AuthorizationContextProvider |
BokuHttpAuthFilter |
getBokuHttpAuthFilter()
Get the
BokuHttpAuthFilter to be installed in your web application. |
HttpMessageSigner |
getHttpMessageSigner()
Get the
HttpMessageSigner |
static ServerAuthorizationComponentsFactory |
getInstance()
Get the static instance of
ServerAuthorizationComponentsFactory, initializing if necessary.See class-level docs for details. |
ThreadLocalServletRequestContextHolder |
getThreadLocalServletRequestContextHolder()
|
static void |
init(Map<String,String> params)
For static initialization via
BokuHttpAuthFilter init-params. |
public static final String KEYPROVIDER_TYPE_PKCS12
public static final String KEYPROVIDER_TYPE_CUSTOM
public static final String KEYPROVIDER_TYPE_KEY
public static final String KEYPROVIDER_TYPE_DEFAULT
public static final String KEYPROVIDER_P12_FILE_KEY
public static final String KEYPROVIDER_P12_FILE_DEFAULT
public static final String KEYPROVIDER_P12_PASSWORD_KEY
public static final String KEYPROVIDER_CUSTOM_FACTORY_METHOD_KEY
public ServerAuthorizationComponentsFactory(KeyProvider keyProvider)
BasicStringSignerImpl and your given KeyProvider
implementation.public ServerAuthorizationComponentsFactory(StringSigner stringSigner)
StringSigner implementation.public static ServerAuthorizationComponentsFactory getInstance()
ServerAuthorizationComponentsFactory, initializing if necessary.public AuthorizationContextProvider getAuthorizationContextProvider()
AuthorizationContextProviderpublic BokuHttpAuthFilter getBokuHttpAuthFilter()
BokuHttpAuthFilter to be installed in your web application.public ThreadLocalServletRequestContextHolder getThreadLocalServletRequestContextHolder()
ThreadLocalServletRequestContextHolder. You should not need to access this manually in most
cases.public HttpMessageSigner getHttpMessageSigner()
HttpMessageSignerpublic static void init(Map<String,String> params)
BokuHttpAuthFilter init-params.params - The filter init params in map form.Copyright © 2020. All rights reserved.