Package org.apache.sling.auth.saml2

## Interface Saml2UserMgtService

    public interface Saml2UserMgtService

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `cleanUp()` Call cleanUp after using Saml2UserMgtService methods This should be called after using the service to close out the service resolver
`org.apache.jackrabbit.api.security.user.User` `getOrCreateSamlUser​(Saml2User user)` getOrCreateSamlUser(Saml2User user) will be called if userHome is not configured
`org.apache.jackrabbit.api.security.user.User` `getOrCreateSamlUser​(Saml2User user, String userHome)` getOrCreateSamlUser(Saml2User user) will be called if userHome is configured
`boolean` `setUp()` Call setUp before using any other Saml2UserMgtService method Setup initializes service resolver and called before each use
`boolean` `updateGroupMembership​(Saml2User user)` Users group membership will be updated based on the groups contained in the configured element of the SAML Assertion
`boolean` `updateUserProperties​(Saml2User user)` Users properties will be updated based on user properties contained in the configured properties of the SAML Assertion

### Method Detail

#### setUp

    boolean setUp()

Call setUp before using any other Saml2UserMgtService method Setup initializes service resolver and called before each use

Returns:
  returns true if setup is successful

#### getOrCreateSamlUser

    org.apache.jackrabbit.api.security.user.User getOrCreateSamlUser​(Saml2User user)

getOrCreateSamlUser(Saml2User user) will be called if userHome is not configured

Parameters:
  `user` - creates the JCR user in the default /home location
Returns:
  returns the existing or new JCR user

#### getOrCreateSamlUser

    org.apache.jackrabbit.api.security.user.User getOrCreateSamlUser​(Saml2User user,
                                                                     String userHome)

getOrCreateSamlUser(Saml2User user) will be called if userHome is configured

Parameters:
  `user` - gets or creates the JCR user in supplied userHome path
  `userHome` - is the supplied path under which to find or create the user
Returns:
  returns the existing or new JCR user

#### updateGroupMembership

    boolean updateGroupMembership​(Saml2User user)

Users group membership will be updated based on the groups contained in the configured element of the SAML Assertion

Parameters:
  `user` - to update membership
Returns:
  returns true if the user's group membership was updated

#### updateUserProperties

    boolean updateUserProperties​(Saml2User user)

Users properties will be updated based on user properties contained in the configured properties of the SAML Assertion

Parameters:
  `user` - to update properties
Returns:
  returns true if the user properties were updated

#### cleanUp

    void cleanUp()

Call cleanUp after using Saml2UserMgtService methods This should be called after using the service to close out the service resolver