Home All Groups
jbossws-spi / org / jboss / wsf / spi / security / SecurityDomainContext.html /

Interface SecurityDomainContext

  • public interface SecurityDomainContext
    A container independent security domain related facility
    [email protected]
    • Method Detail

      • getSecurityDomain

        String getSecurityDomain()
      • isValid

        boolean isValid(Principal principal,
                        Object credential,
                        Subject activeSubject)
        The isValid method is invoked to see if a user identity and associated credentials as known in the operational environment are valid proof of the user identity.
        principal - - the user identity in the operation environment
        credential - - the proof of user identity as known in the operation environment
        activeSubject - - the Subject which should be populated with the validated Subject contents. A JAAS based implementation would typically populate the activeSubject with the LoginContext.login result.
        true if the principal, credential pair is valid, false otherwise.
      • doesUserHaveRole

        boolean doesUserHaveRole(Principal principal,
                                 Set<Principal> roles)
        Validates the application domain roles to which the operational environment Principal belongs.
        principal - the caller principal as known in the operation environment.
        roles - The Set<java.security.Principal> for the application domain roles that the principal is to be validated against.
        true if the principal has at least one of the roles in the roles set, false otherwise.
      • getUserRoles

        Set<Principal> getUserRoles(Principal principal)
        Return the set of domain roles the principal has been assigned.
        principal - principal
        The Set<java.security.Principal> for the application domain roles that the principal has been assigned.
      • pushSubjectContext

        void pushSubjectContext(Subject subject,
                                Principal principal,
                                Object credential)
        Push the provided subject into the current security context; if that's not set yet, also creates a new security context and associates it with the current thread.
        subject - subject
        principal - principal
        credential - credential
      • runAs

        void runAs(Callable<Void> action)
            throws Exception
        Run action under this security context
        action - the action to run
        Exception - if input action fails

Copyright © 2018 JBoss, by Red Hat. All rights reserved.