Interface ExternalIdentityProvider

  • All Known Implementing Classes:
    CustomExternalIdentityProvider, LdapIdentityProvider

    public interface ExternalIdentityProvider
    ExternalIdentityProvider defines an interface to an external system that provides users and groups that can be synced with local ones.
    • Method Detail

      • getName

        @NotNull
        @NotNull java.lang.String getName()
        Returns the name of this provider.
        Returns:
        the provider name.
      • getUser

        @Nullable
        @Nullable ExternalUser getUser​(@NotNull
                                       @NotNull java.lang.String userId)
                                throws ExternalIdentityException
        Returns the user for the given (local) id. if the user does not exist null is returned.
        Parameters:
        userId - the user id.
        Returns:
        the user or null
        Throws:
        ExternalIdentityException - if an error occurs.
      • authenticate

        @Nullable
        @Nullable ExternalUser authenticate​(@NotNull
                                            @NotNull Credentials credentials)
                                     throws ExternalIdentityException,
                                            javax.security.auth.login.LoginException
        Authenticates the user represented by the given credentials and returns it. If the user does not exist in this provider, null is returned. If the authentication fails, a LoginException is thrown.
        Parameters:
        credentials - the credentials
        Returns:
        the user or null
        Throws:
        ExternalIdentityException - if an error occurs
        javax.security.auth.login.LoginException - if the user could not be authenticated
      • getGroup

        @Nullable
        @Nullable ExternalGroup getGroup​(@NotNull
                                         @NotNull java.lang.String name)
                                  throws ExternalIdentityException
        Returns the group for the given (local) group name. if the group does not exist null is returned.
        Parameters:
        name - the group name
        Returns:
        the group or null
        Throws:
        ExternalIdentityException - if an error occurs.