All Verbs | /jwt |
---|
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 CreateJwt extends AuthUserSession
{
public Date jwtExpiry = null;
public Date getJwtExpiry() { return jwtExpiry; }
public CreateJwt setJwtExpiry(Date value) { this.jwtExpiry = 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 CreateJwtResponse
{
public String token = null;
public ResponseStatus responseStatus = null;
public String getToken() { return token; }
public CreateJwtResponse setToken(String value) { this.token = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public CreateJwtResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jwt HTTP/1.1
Host: test.servicestack.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateJwt xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Test.ServiceInterface">
<ReferrerUrl xmlns="http://schemas.servicestack.net/types">String</ReferrerUrl>
<Id xmlns="http://schemas.servicestack.net/types">String</Id>
<UserAuthId xmlns="http://schemas.servicestack.net/types">String</UserAuthId>
<UserAuthName xmlns="http://schemas.servicestack.net/types">String</UserAuthName>
<UserName xmlns="http://schemas.servicestack.net/types">String</UserName>
<TwitterUserId xmlns="http://schemas.servicestack.net/types">String</TwitterUserId>
<TwitterScreenName xmlns="http://schemas.servicestack.net/types">String</TwitterScreenName>
<FacebookUserId xmlns="http://schemas.servicestack.net/types">String</FacebookUserId>
<FacebookUserName xmlns="http://schemas.servicestack.net/types">String</FacebookUserName>
<FirstName xmlns="http://schemas.servicestack.net/types">String</FirstName>
<LastName xmlns="http://schemas.servicestack.net/types">String</LastName>
<DisplayName xmlns="http://schemas.servicestack.net/types">String</DisplayName>
<Company xmlns="http://schemas.servicestack.net/types">String</Company>
<Email xmlns="http://schemas.servicestack.net/types">String</Email>
<PrimaryEmail xmlns="http://schemas.servicestack.net/types">String</PrimaryEmail>
<PhoneNumber xmlns="http://schemas.servicestack.net/types">String</PhoneNumber>
<BirthDate xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</BirthDate>
<BirthDateRaw xmlns="http://schemas.servicestack.net/types">String</BirthDateRaw>
<Address xmlns="http://schemas.servicestack.net/types">String</Address>
<Address2 xmlns="http://schemas.servicestack.net/types">String</Address2>
<City xmlns="http://schemas.servicestack.net/types">String</City>
<State xmlns="http://schemas.servicestack.net/types">String</State>
<Country xmlns="http://schemas.servicestack.net/types">String</Country>
<Culture xmlns="http://schemas.servicestack.net/types">String</Culture>
<FullName xmlns="http://schemas.servicestack.net/types">String</FullName>
<Gender xmlns="http://schemas.servicestack.net/types">String</Gender>
<Language xmlns="http://schemas.servicestack.net/types">String</Language>
<MailAddress xmlns="http://schemas.servicestack.net/types">String</MailAddress>
<Nickname xmlns="http://schemas.servicestack.net/types">String</Nickname>
<PostalCode xmlns="http://schemas.servicestack.net/types">String</PostalCode>
<TimeZone xmlns="http://schemas.servicestack.net/types">String</TimeZone>
<RequestTokenSecret xmlns="http://schemas.servicestack.net/types">String</RequestTokenSecret>
<CreatedAt xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</CreatedAt>
<LastModified xmlns="http://schemas.servicestack.net/types">0001-01-01T00:00:00</LastModified>
<Roles xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d2p1:string>String</d2p1:string>
</Roles>
<Permissions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d2p1:string>String</d2p1:string>
</Permissions>
<IsAuthenticated xmlns="http://schemas.servicestack.net/types">false</IsAuthenticated>
<FromToken xmlns="http://schemas.servicestack.net/types">false</FromToken>
<ProfileUrl xmlns="http://schemas.servicestack.net/types">String</ProfileUrl>
<Sequence xmlns="http://schemas.servicestack.net/types">String</Sequence>
<Tag xmlns="http://schemas.servicestack.net/types">0</Tag>
<AuthProvider xmlns="http://schemas.servicestack.net/types">String</AuthProvider>
<ProviderOAuthAccess xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d2p1:anyType i:nil="true" />
</ProviderOAuthAccess>
<Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>String</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</Meta>
<Audiences xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d2p1:string>String</d2p1:string>
</Audiences>
<Scopes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.servicestack.net/types">
<d2p1:string>String</d2p1:string>
</Scopes>
<Dns xmlns="http://schemas.servicestack.net/types">String</Dns>
<Rsa xmlns="http://schemas.servicestack.net/types">String</Rsa>
<Sid xmlns="http://schemas.servicestack.net/types">String</Sid>
<Hash xmlns="http://schemas.servicestack.net/types">String</Hash>
<HomePhone xmlns="http://schemas.servicestack.net/types">String</HomePhone>
<MobilePhone xmlns="http://schemas.servicestack.net/types">String</MobilePhone>
<Webpage xmlns="http://schemas.servicestack.net/types">String</Webpage>
<EmailConfirmed xmlns="http://schemas.servicestack.net/types">false</EmailConfirmed>
<PhoneNumberConfirmed xmlns="http://schemas.servicestack.net/types">false</PhoneNumberConfirmed>
<TwoFactorEnabled xmlns="http://schemas.servicestack.net/types">false</TwoFactorEnabled>
<SecurityStamp xmlns="http://schemas.servicestack.net/types">String</SecurityStamp>
<Type xmlns="http://schemas.servicestack.net/types">String</Type>
<RecoveryToken xmlns="http://schemas.servicestack.net/types">String</RecoveryToken>
<RefId xmlns="http://schemas.servicestack.net/types">0</RefId>
<RefIdStr xmlns="http://schemas.servicestack.net/types">String</RefIdStr>
<JwtExpiry>0001-01-01T00:00:00</JwtExpiry>
</CreateJwt>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreateJwtResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Test.ServiceInterface"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <Token>String</Token> </CreateJwtResponse>