public class ClientAuthorizers extends Object
Modifier and Type | Field and Description |
---|---|
static ClientAuthorizer |
FALSE
Authorizer which always denies access,
with INFO logging either way.
|
static ClientAuthorizer |
TRUE
Authorizer which always permits access,
with WARNING logging either way.
|
Modifier and Type | Method and Description |
---|---|
static ClientAuthorizer |
createFixedClientAuthorizer(boolean policy)
Returns a new authorizer instance which always produces the same
authorization status.
|
static ClientAuthorizer |
createLoggingClientAuthorizer(ClientAuthorizer auth,
Level acceptLevel,
Level refuseLevel)
Returns a new authorizer instance based on an existing one which
logs authorization results through the logging system.
|
static String |
getAppName(Map securityMap)
Returns the mandatory application name entry from the security map
supplied explicitly by clients wishing to register.
|
public static final ClientAuthorizer FALSE
public static final ClientAuthorizer TRUE
public static ClientAuthorizer createFixedClientAuthorizer(boolean policy)
policy
- true for accept, false for denypublic static ClientAuthorizer createLoggingClientAuthorizer(ClientAuthorizer auth, Level acceptLevel, Level refuseLevel)
auth
- base authorizeracceptLevel
- logging level at which auth acceptances are loggedrefuseLevel
- logging level at which auth refusals are loggedpublic static String getAppName(Map securityMap) throws SampException
securityMap
- map supplied by clientSampException
- if name not presentCopyright © 2008–2024. All rights reserved.