MyApp

<back to all web services

Register

auth

Sign Up

The following routes are available for this service:
PUT,POST/register
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Sign Up
    */
    @Api(Description="Sign Up")
    @DataContract
    public static class Register implements IPost, IMeta
    {
        @DataMember(Order=1)
        public String userName = null;

        @DataMember(Order=2)
        public String firstName = null;

        @DataMember(Order=3)
        public String lastName = null;

        @DataMember(Order=4)
        public String displayName = null;

        @DataMember(Order=5)
        public String email = null;

        @DataMember(Order=6)
        public String password = null;

        @DataMember(Order=7)
        public String confirmPassword = null;

        @DataMember(Order=8)
        public Boolean autoLogin = null;

        @DataMember(Order=10)
        public String errorView = null;

        @DataMember(Order=11)
        public HashMap<String,String> meta = null;
        
        public String getUserName() { return userName; }
        public Register setUserName(String value) { this.userName = value; return this; }
        public String getFirstName() { return firstName; }
        public Register setFirstName(String value) { this.firstName = value; return this; }
        public String getLastName() { return lastName; }
        public Register setLastName(String value) { this.lastName = value; return this; }
        public String getDisplayName() { return displayName; }
        public Register setDisplayName(String value) { this.displayName = value; return this; }
        public String getEmail() { return email; }
        public Register setEmail(String value) { this.email = value; return this; }
        public String getPassword() { return password; }
        public Register setPassword(String value) { this.password = value; return this; }
        public String getConfirmPassword() { return confirmPassword; }
        public Register setConfirmPassword(String value) { this.confirmPassword = value; return this; }
        public Boolean isAutoLogin() { return autoLogin; }
        public Register setAutoLogin(Boolean value) { this.autoLogin = value; return this; }
        public String getErrorView() { return errorView; }
        public Register setErrorView(String value) { this.errorView = value; return this; }
        public HashMap<String,String> getMeta() { return meta; }
        public Register setMeta(HashMap<String,String> value) { this.meta = value; return this; }
    }

    @DataContract
    public static class RegisterResponse implements IMeta, IHasSessionId, IHasBearerToken
    {
        @DataMember(Order=1)
        public String userId = null;

        @DataMember(Order=2)
        public String sessionId = null;

        @DataMember(Order=3)
        public String userName = null;

        @DataMember(Order=4)
        public String referrerUrl = null;

        @DataMember(Order=5)
        public String bearerToken = null;

        @DataMember(Order=6)
        public String refreshToken = null;

        @DataMember(Order=7)
        public Date refreshTokenExpiry = null;

        @DataMember(Order=8)
        public ArrayList<String> roles = null;

        @DataMember(Order=9)
        public ArrayList<String> permissions = null;

        @DataMember(Order=10)
        public ResponseStatus responseStatus = null;

        @DataMember(Order=11)
        public HashMap<String,String> meta = null;
        
        public String getUserId() { return userId; }
        public RegisterResponse setUserId(String value) { this.userId = value; return this; }
        public String getSessionId() { return sessionId; }
        public RegisterResponse setSessionId(String value) { this.sessionId = value; return this; }
        public String getUserName() { return userName; }
        public RegisterResponse setUserName(String value) { this.userName = value; return this; }
        public String getReferrerUrl() { return referrerUrl; }
        public RegisterResponse setReferrerUrl(String value) { this.referrerUrl = value; return this; }
        public String getBearerToken() { return bearerToken; }
        public RegisterResponse setBearerToken(String value) { this.bearerToken = value; return this; }
        public String getRefreshToken() { return refreshToken; }
        public RegisterResponse setRefreshToken(String value) { this.refreshToken = value; return this; }
        public Date getRefreshTokenExpiry() { return refreshTokenExpiry; }
        public RegisterResponse setRefreshTokenExpiry(Date value) { this.refreshTokenExpiry = value; return this; }
        public ArrayList<String> getRoles() { return roles; }
        public RegisterResponse setRoles(ArrayList<String> value) { this.roles = value; return this; }
        public ArrayList<String> getPermissions() { return permissions; }
        public RegisterResponse setPermissions(ArrayList<String> value) { this.permissions = value; return this; }
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public RegisterResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
        public HashMap<String,String> getMeta() { return meta; }
        public RegisterResponse setMeta(HashMap<String,String> value) { this.meta = value; return this; }
    }

}

Java Register DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /register HTTP/1.1 
Host: vue-vite-api.jamstacks.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"userName":"String","firstName":"String","lastName":"String","displayName":"String","email":"String","password":"String","confirmPassword":"String","autoLogin":false,"errorView":"String","meta":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"userId":"String","sessionId":"String","userName":"String","referrerUrl":"String","bearerToken":"String","refreshToken":"String","refreshTokenExpiry":"\/Date(-62135596800000-0000)\/","roles":["String"],"permissions":["String"],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"meta":{"String":"String"}}