Interface SecurityConfigurationMapping

  • All Superinterfaces:
    ContextRelated

    public interface SecurityConfigurationMapping
    extends ContextRelated

    Single interface to register 3 security aspects of web.xml configuration:

    • <login-config>
    • <security-constraint>
    • <security-role>

    This mapping was created as the last one for the purpose of Pax Web #1823 issue.

    In Pax Web 7 we had two methods (which are back in Pax Web 8, but only for compatibility purpose):

    • org.ops4j.pax.web.service.WebContainer#registerLoginConfig()
    • org.ops4j.pax.web.service.WebContainer#registerConstraintMapping()
    However these were not atomic (or rather as atomic as it's rational), because both methods leads to restart of the underlying context. When Whiteboard-registering a service with this interface, we can do everything within single context restart.

    Author:
    Grzegorz Grzybek
    • Method Detail

      • getAuthMethod

        String getAuthMethod()
        Returns <login-config>/<auth-method>
        Returns:
      • getRealmName

        String getRealmName()
        Returns <login-config>/<realm-name>
        Returns:
      • getFormLoginPage

        String getFormLoginPage()
        Returns <login-config>/<form-login-config>/<form-login-page>
        Returns:
      • getFormErrorPage

        String getFormErrorPage()
        Returns <login-config>/<form-login-config>/<form-error-page>
        Returns:
      • getSecurityRoles

        Collection<String> getSecurityRoles()
        Returns declared security roles (<security-role>/<role-name>)
        Returns: