Top Description Fields Constructors Methods
waffle.servlet.spi

public Class SecurityFilterProviderCollection

extends Object
Class Inheritance
Imports
com.sun.jna.platform.win32.Win32Exception, java.io.IOException, java.lang.reflect.Constructor, .InvocationTargetException, java.util.ArrayList, .List, javax.servlet.http.HttpServletRequest, .HttpServletResponse, org.slf4j.Logger, .LoggerFactory, waffle.util.AuthorizationHeader, waffle.windows.auth.IWindowsAuthProvider, .IWindowsIdentity

A collection of security filter providers.
Author
dblock[at]dblock[dot]org

Field Summary

Modifier and TypeField and Description
private static final Logger
LOGGER

The Constant LOGGER.

private final List<SecurityFilterProvider>
providers

The providers.

Constructor Summary

AccessConstructor and Description
public
SecurityFilterProviderCollection(final SecurityFilterProvider[]
the provider array
providerArray
)

Instantiates a new security filter provider collection.

public
SecurityFilterProviderCollection(final String[]
the provider names
providerNames
,
final IWindowsAuthProvider
the auth
auth
)

Instantiates a new security filter provider collection.

public
SecurityFilterProviderCollection(final IWindowsAuthProvider
the auth
auth
)

Instantiates a new security filter provider collection.

Method Summary

Modifier and TypeMethod and Description
public IWindowsIdentity

Returns:

Windows Identity or NULL.
doFilter
(final HttpServletRequest
Http Request
request
,
final HttpServletResponse
Http Response
response
)

Filter.

private SecurityFilterProvider

Returns:

the security filter provider
get
(final String
the security package
securityPackage
)

Gets the.

public SecurityFilterProvider

Returns:

A security provider instance.
getByClassName
(final String
Class name.
name
)

Get a security provider by class name.

public boolean

Returns:

True if authentication is required.
isPrincipalException
(final HttpServletRequest
Http Request
request
)

Returns true if authentication still needs to happen despite an existing principal.

public boolean

Returns:

True if the security package is supported, false otherwise.
isSecurityPackageSupported
(final String
Security package.
securityPackage
)

Tests whether a specific security package is supported by any of the underlying providers.

public void
sendUnauthorized(final HttpServletResponse
Http Response
response
)

Send authorization headers.

public int

Returns:

Number of providers.
size
()

Number of providers.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER

The Constant LOGGER.

providersback to summary
private final List<SecurityFilterProvider> providers

The providers.

Constructor Detail

SecurityFilterProviderCollectionback to summary
public SecurityFilterProviderCollection(final SecurityFilterProvider[] providerArray)

Instantiates a new security filter provider collection.

Parameters
providerArray:SecurityFilterProvider[]

the provider array

SecurityFilterProviderCollectionback to summary
public SecurityFilterProviderCollection(final String[] providerNames, final IWindowsAuthProvider auth)

Instantiates a new security filter provider collection.

Parameters
providerNames:String[]

the provider names

auth:IWindowsAuthProvider

the auth

Annotations
@SuppressWarnings:unchecked
SecurityFilterProviderCollectionback to summary
public SecurityFilterProviderCollection(final IWindowsAuthProvider auth)

Instantiates a new security filter provider collection.

Parameters
auth:IWindowsAuthProvider

the auth

Method Detail

doFilterback to summary
public IWindowsIdentity doFilter(final HttpServletRequest request, final HttpServletResponse response) throws IOException

Filter.

Parameters
request:HttpServletRequest

Http Request

response:HttpServletResponse

Http Response

Returns:IWindowsIdentity

Windows Identity or NULL.

Exceptions
IOException:
on doFilter.
getback to summary
private SecurityFilterProvider get(final String securityPackage)

Gets the.

Parameters
securityPackage:String

the security package

Returns:SecurityFilterProvider

the security filter provider

getByClassNameback to summary
public SecurityFilterProvider getByClassName(final String name) throws ClassNotFoundException

Get a security provider by class name.

Parameters
name:String

Class name.

Returns:SecurityFilterProvider

A security provider instance.

Exceptions
ClassNotFoundException:
when class not found.
isPrincipalExceptionback to summary
public boolean isPrincipalException(final HttpServletRequest request)

Returns true if authentication still needs to happen despite an existing principal.

Parameters
request:HttpServletRequest

Http Request

Returns:boolean

True if authentication is required.

isSecurityPackageSupportedback to summary
public boolean isSecurityPackageSupported(final String securityPackage)

Tests whether a specific security package is supported by any of the underlying providers.

Parameters
securityPackage:String

Security package.

Returns:boolean

True if the security package is supported, false otherwise.

sendUnauthorizedback to summary
public void sendUnauthorized(final HttpServletResponse response)

Send authorization headers.

Parameters
response:HttpServletResponse

Http Response

sizeback to summary
public int size()

Number of providers.

Returns:int

Number of providers.