Class PutUsername

  • All Implemented Interfaces:
    RestModifyView<AccountResource,​UsernameInput>, RestView<AccountResource>

    public class PutUsername
    extends Object
    implements RestModifyView<AccountResource,​UsernameInput>
    REST endpoint to set the username of an account.

    This REST endpoint handles PUT /accounts/<account-identifier>/username requests.

    Whether a username can be set depends on whether the used Realm supports this.

    Once set a username cannot be changed or deleted. Changing usernames is disallowed because they can be used in ref names that represent user-specific sandbox branches which can exist in any repository and we have no way to find and rename those refs.