Class AnonUsernamePasswordLinkService

java.lang.Object
dev.getelements.elements.service.user.AnonUsernamePasswordLinkService
All Implemented Interfaces:
UsernamePasswordLinkService

public class AnonUsernamePasswordLinkService extends Object implements UsernamePasswordLinkService
Anonymous implementation of UsernamePasswordLinkService.

Always throws ForbiddenException; authentication is required to link credentials.

  • Constructor Details

    • AnonUsernamePasswordLinkService

      public AnonUsernamePasswordLinkService()
  • Method Details

    • linkUsernamePassword

      public User linkUsernamePassword(String username, String password)
      Description copied from interface: UsernamePasswordLinkService
      Links username+password credentials to the authenticated user's account.

      If the account has no username yet, the supplied username is claimed and recorded. If the account already has a username it must match the supplied value; name changes must be performed explicitly via the user-update endpoints.

      Specified by:
      linkUsernamePassword in interface UsernamePasswordLinkService
      Parameters:
      username - the username to associate (must be available or already owned by this user)
      password - the password to set
      Returns:
      the updated User