All Verbs | /session |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
public static class GetSession
{
}
public static class GetSessionResponse
{
public CustomUserSession result = null;
public UnAuthInfo unAuthInfo = null;
public ResponseStatus responseStatus = null;
public CustomUserSession getResult() { return result; }
public GetSessionResponse setResult(CustomUserSession value) { this.result = value; return this; }
public UnAuthInfo getUnAuthInfo() { return unAuthInfo; }
public GetSessionResponse setUnAuthInfo(UnAuthInfo value) { this.unAuthInfo = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public GetSessionResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
public static class CustomUserSession extends AuthUserSession
{
@DataMember
public String customName = null;
@DataMember
public String customInfo = null;
public String getCustomName() { return customName; }
public CustomUserSession setCustomName(String value) { this.customName = value; return this; }
public String getCustomInfo() { return customInfo; }
public CustomUserSession setCustomInfo(String value) { this.customInfo = value; return this; }
}
@DataContract
public static class AuthUserSession implements IMeta
{
@DataMember(Order=1)
public String referrerUrl = null;
@DataMember(Order=2)
public String id = null;
@DataMember(Order=3)
public String userAuthId = null;
@DataMember(Order=4)
public String userAuthName = null;
@DataMember(Order=5)
public String userName = null;
@DataMember(Order=6)
public String twitterUserId = null;
@DataMember(Order=7)
public String twitterScreenName = null;
@DataMember(Order=8)
public String facebookUserId = null;
@DataMember(Order=9)
public String facebookUserName = null;
@DataMember(Order=10)
public String firstName = null;
@DataMember(Order=11)
public String lastName = null;
@DataMember(Order=12)
public String displayName = null;
@DataMember(Order=13)
public String company = null;
@DataMember(Order=14)
public String email = null;
@DataMember(Order=15)
public String primaryEmail = null;
@DataMember(Order=16)
public String phoneNumber = null;
@DataMember(Order=17)
public Date birthDate = null;
@DataMember(Order=18)
public String birthDateRaw = null;
@DataMember(Order=19)
public String address = null;
@DataMember(Order=20)
public String address2 = null;
@DataMember(Order=21)
public String city = null;
@DataMember(Order=22)
public String state = null;
@DataMember(Order=23)
public String country = null;
@DataMember(Order=24)
public String culture = null;
@DataMember(Order=25)
public String fullName = null;
@DataMember(Order=26)
public String gender = null;
@DataMember(Order=27)
public String language = null;
@DataMember(Order=28)
public String mailAddress = null;
@DataMember(Order=29)
public String nickname = null;
@DataMember(Order=30)
public String postalCode = null;
@DataMember(Order=31)
public String timeZone = null;
@DataMember(Order=32)
public String requestTokenSecret = null;
@DataMember(Order=33)
public Date createdAt = null;
@DataMember(Order=34)
public Date lastModified = null;
@DataMember(Order=35)
public ArrayList<String> roles = null;
@DataMember(Order=36)
public ArrayList<String> permissions = null;
@DataMember(Order=37)
public Boolean isAuthenticated = null;
@DataMember(Order=38)
public Boolean fromToken = null;
@DataMember(Order=39)
public String profileUrl = null;
@DataMember(Order=40)
public String sequence = null;
@DataMember(Order=41)
public Long tag = null;
@DataMember(Order=42)
public String authProvider = null;
@DataMember(Order=43)
public ArrayList<IAuthTokens> providerOAuthAccess = null;
@DataMember(Order=44)
public HashMap<String,String> meta = null;
@DataMember(Order=45)
public ArrayList<String> audiences = null;
@DataMember(Order=46)
public ArrayList<String> scopes = null;
@DataMember(Order=47)
public String dns = null;
@DataMember(Order=48)
public String rsa = null;
@DataMember(Order=49)
public String sid = null;
@DataMember(Order=50)
public String hash = null;
@DataMember(Order=51)
public String homePhone = null;
@DataMember(Order=52)
public String mobilePhone = null;
@DataMember(Order=53)
public String webpage = null;
@DataMember(Order=54)
public Boolean emailConfirmed = null;
@DataMember(Order=55)
public Boolean phoneNumberConfirmed = null;
@DataMember(Order=56)
public Boolean twoFactorEnabled = null;
@DataMember(Order=57)
public String securityStamp = null;
@DataMember(Order=58)
public String type = null;
@DataMember(Order=59)
public String recoveryToken = null;
@DataMember(Order=60)
public Integer refId = null;
@DataMember(Order=61)
public String refIdStr = null;
public String getReferrerUrl() { return referrerUrl; }
public AuthUserSession setReferrerUrl(String value) { this.referrerUrl = value; return this; }
public String getId() { return id; }
public AuthUserSession setId(String value) { this.id = value; return this; }
public String getUserAuthId() { return userAuthId; }
public AuthUserSession setUserAuthId(String value) { this.userAuthId = value; return this; }
public String getUserAuthName() { return userAuthName; }
public AuthUserSession setUserAuthName(String value) { this.userAuthName = value; return this; }
public String getUserName() { return userName; }
public AuthUserSession setUserName(String value) { this.userName = value; return this; }
public String getTwitterUserId() { return twitterUserId; }
public AuthUserSession setTwitterUserId(String value) { this.twitterUserId = value; return this; }
public String getTwitterScreenName() { return twitterScreenName; }
public AuthUserSession setTwitterScreenName(String value) { this.twitterScreenName = value; return this; }
public String getFacebookUserId() { return facebookUserId; }
public AuthUserSession setFacebookUserId(String value) { this.facebookUserId = value; return this; }
public String getFacebookUserName() { return facebookUserName; }
public AuthUserSession setFacebookUserName(String value) { this.facebookUserName = value; return this; }
public String getFirstName() { return firstName; }
public AuthUserSession setFirstName(String value) { this.firstName = value; return this; }
public String getLastName() { return lastName; }
public AuthUserSession setLastName(String value) { this.lastName = value; return this; }
public String getDisplayName() { return displayName; }
public AuthUserSession setDisplayName(String value) { this.displayName = value; return this; }
public String getCompany() { return company; }
public AuthUserSession setCompany(String value) { this.company = value; return this; }
public String getEmail() { return email; }
public AuthUserSession setEmail(String value) { this.email = value; return this; }
public String getPrimaryEmail() { return primaryEmail; }
public AuthUserSession setPrimaryEmail(String value) { this.primaryEmail = value; return this; }
public String getPhoneNumber() { return phoneNumber; }
public AuthUserSession setPhoneNumber(String value) { this.phoneNumber = value; return this; }
public Date getBirthDate() { return birthDate; }
public AuthUserSession setBirthDate(Date value) { this.birthDate = value; return this; }
public String getBirthDateRaw() { return birthDateRaw; }
public AuthUserSession setBirthDateRaw(String value) { this.birthDateRaw = value; return this; }
public String getAddress() { return address; }
public AuthUserSession setAddress(String value) { this.address = value; return this; }
public String getAddress2() { return address2; }
public AuthUserSession setAddress2(String value) { this.address2 = value; return this; }
public String getCity() { return city; }
public AuthUserSession setCity(String value) { this.city = value; return this; }
public String getState() { return state; }
public AuthUserSession setState(String value) { this.state = value; return this; }
public String getCountry() { return country; }
public AuthUserSession setCountry(String value) { this.country = value; return this; }
public String getCulture() { return culture; }
public AuthUserSession setCulture(String value) { this.culture = value; return this; }
public String getFullName() { return fullName; }
public AuthUserSession setFullName(String value) { this.fullName = value; return this; }
public String getGender() { return gender; }
public AuthUserSession setGender(String value) { this.gender = value; return this; }
public String getLanguage() { return language; }
public AuthUserSession setLanguage(String value) { this.language = value; return this; }
public String getMailAddress() { return mailAddress; }
public AuthUserSession setMailAddress(String value) { this.mailAddress = value; return this; }
public String getNickname() { return nickname; }
public AuthUserSession setNickname(String value) { this.nickname = value; return this; }
public String getPostalCode() { return postalCode; }
public AuthUserSession setPostalCode(String value) { this.postalCode = value; return this; }
public String getTimeZone() { return timeZone; }
public AuthUserSession setTimeZone(String value) { this.timeZone = value; return this; }
public String getRequestTokenSecret() { return requestTokenSecret; }
public AuthUserSession setRequestTokenSecret(String value) { this.requestTokenSecret = value; return this; }
public Date getCreatedAt() { return createdAt; }
public AuthUserSession setCreatedAt(Date value) { this.createdAt = value; return this; }
public Date getLastModified() { return lastModified; }
public AuthUserSession setLastModified(Date value) { this.lastModified = value; return this; }
public ArrayList<String> getRoles() { return roles; }
public AuthUserSession setRoles(ArrayList<String> value) { this.roles = value; return this; }
public ArrayList<String> getPermissions() { return permissions; }
public AuthUserSession setPermissions(ArrayList<String> value) { this.permissions = value; return this; }
public Boolean getIsAuthenticated() { return isAuthenticated; }
public AuthUserSession setIsAuthenticated(Boolean value) { this.isAuthenticated = value; return this; }
public Boolean isFromToken() { return fromToken; }
public AuthUserSession setFromToken(Boolean value) { this.fromToken = value; return this; }
public String getProfileUrl() { return profileUrl; }
public AuthUserSession setProfileUrl(String value) { this.profileUrl = value; return this; }
public String getSequence() { return sequence; }
public AuthUserSession setSequence(String value) { this.sequence = value; return this; }
public Long getTag() { return tag; }
public AuthUserSession setTag(Long value) { this.tag = value; return this; }
public String getAuthProvider() { return authProvider; }
public AuthUserSession setAuthProvider(String value) { this.authProvider = value; return this; }
public ArrayList<IAuthTokens> getProviderOAuthAccess() { return providerOAuthAccess; }
public AuthUserSession setProviderOAuthAccess(ArrayList<IAuthTokens> value) { this.providerOAuthAccess = value; return this; }
public HashMap<String,String> getMeta() { return meta; }
public AuthUserSession setMeta(HashMap<String,String> value) { this.meta = value; return this; }
public ArrayList<String> getAudiences() { return audiences; }
public AuthUserSession setAudiences(ArrayList<String> value) { this.audiences = value; return this; }
public ArrayList<String> getScopes() { return scopes; }
public AuthUserSession setScopes(ArrayList<String> value) { this.scopes = value; return this; }
public String getDns() { return dns; }
public AuthUserSession setDns(String value) { this.dns = value; return this; }
public String getRsa() { return rsa; }
public AuthUserSession setRsa(String value) { this.rsa = value; return this; }
public String getSid() { return sid; }
public AuthUserSession setSid(String value) { this.sid = value; return this; }
public String getHash() { return hash; }
public AuthUserSession setHash(String value) { this.hash = value; return this; }
public String getHomePhone() { return homePhone; }
public AuthUserSession setHomePhone(String value) { this.homePhone = value; return this; }
public String getMobilePhone() { return mobilePhone; }
public AuthUserSession setMobilePhone(String value) { this.mobilePhone = value; return this; }
public String getWebpage() { return webpage; }
public AuthUserSession setWebpage(String value) { this.webpage = value; return this; }
public Boolean isEmailConfirmed() { return emailConfirmed; }
public AuthUserSession setEmailConfirmed(Boolean value) { this.emailConfirmed = value; return this; }
public Boolean isPhoneNumberConfirmed() { return phoneNumberConfirmed; }
public AuthUserSession setPhoneNumberConfirmed(Boolean value) { this.phoneNumberConfirmed = value; return this; }
public Boolean isTwoFactorEnabled() { return twoFactorEnabled; }
public AuthUserSession setTwoFactorEnabled(Boolean value) { this.twoFactorEnabled = value; return this; }
public String getSecurityStamp() { return securityStamp; }
public AuthUserSession setSecurityStamp(String value) { this.securityStamp = value; return this; }
public String getType() { return type; }
public AuthUserSession setType(String value) { this.type = value; return this; }
public String getRecoveryToken() { return recoveryToken; }
public AuthUserSession setRecoveryToken(String value) { this.recoveryToken = value; return this; }
public Integer getRefId() { return refId; }
public AuthUserSession setRefId(Integer value) { this.refId = value; return this; }
public String getRefIdStr() { return refIdStr; }
public AuthUserSession setRefIdStr(String value) { this.refIdStr = value; return this; }
}
public static interface IAuthTokens
{
public String provider = null;
public String userId = null;
public String accessToken = null;
public String accessTokenSecret = null;
public String refreshToken = null;
public Date refreshTokenExpiry = null;
public String requestToken = null;
public String requestTokenSecret = null;
public HashMap<String,String> items = null;
}
public static class UnAuthInfo
{
public String customInfo = null;
public String getCustomInfo() { return customInfo; }
public UnAuthInfo setCustomInfo(String value) { this.customInfo = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /session HTTP/1.1
Host: test.servicestack.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { result: { customName: String, customInfo: String, referrerUrl: String, id: String, userAuthId: String, userAuthName: String, userName: String, twitterUserId: String, twitterScreenName: String, facebookUserId: String, facebookUserName: String, firstName: String, lastName: String, displayName: String, company: String, email: String, primaryEmail: String, phoneNumber: String, birthDate: 0001-01-01, birthDateRaw: String, address: String, address2: String, city: String, state: String, country: String, culture: String, fullName: String, gender: String, language: String, mailAddress: String, nickname: String, postalCode: String, timeZone: String, requestTokenSecret: String, createdAt: 0001-01-01, lastModified: 0001-01-01, roles: [ String ], permissions: [ String ], isAuthenticated: False, fromToken: False, profileUrl: String, sequence: String, tag: 0, authProvider: String, providerOAuthAccess: [ { } ], meta: { String: String }, audiences: [ String ], scopes: [ String ], dns: String, rsa: String, sid: String, hash: String, homePhone: String, mobilePhone: String, webpage: String, emailConfirmed: False, phoneNumberConfirmed: False, twoFactorEnabled: False, securityStamp: String, type: String, recoveryToken: String, refId: 0, refIdStr: String }, unAuthInfo: { customInfo: String }, responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } } }