Test

<back to all web services

CreateJwt

The following routes are available for this service:
All Verbs/jwt
"use strict";
export class AuthUserSession {
    /** @param {{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?:string,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?:string,lastModified?:string,roles?:string[],permissions?:string[],isAuthenticated?:boolean,fromToken?:boolean,profileUrl?:string,sequence?:string,tag?:number,authProvider?:string,providerOAuthAccess?:IAuthTokens[],meta?:{ [index: string]: string; },audiences?:string[],scopes?:string[],dns?:string,rsa?:string,sid?:string,hash?:string,homePhone?:string,mobilePhone?:string,webpage?:string,emailConfirmed?:boolean,phoneNumberConfirmed?:boolean,twoFactorEnabled?:boolean,securityStamp?:string,type?:string,recoveryToken?:string,refId?:number,refIdStr?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    referrerUrl;
    /** @type {string} */
    id;
    /** @type {string} */
    userAuthId;
    /** @type {string} */
    userAuthName;
    /** @type {string} */
    userName;
    /** @type {string} */
    twitterUserId;
    /** @type {string} */
    twitterScreenName;
    /** @type {string} */
    facebookUserId;
    /** @type {string} */
    facebookUserName;
    /** @type {string} */
    firstName;
    /** @type {string} */
    lastName;
    /** @type {string} */
    displayName;
    /** @type {string} */
    company;
    /** @type {string} */
    email;
    /** @type {string} */
    primaryEmail;
    /** @type {string} */
    phoneNumber;
    /** @type {?string} */
    birthDate;
    /** @type {string} */
    birthDateRaw;
    /** @type {string} */
    address;
    /** @type {string} */
    address2;
    /** @type {string} */
    city;
    /** @type {string} */
    state;
    /** @type {string} */
    country;
    /** @type {string} */
    culture;
    /** @type {string} */
    fullName;
    /** @type {string} */
    gender;
    /** @type {string} */
    language;
    /** @type {string} */
    mailAddress;
    /** @type {string} */
    nickname;
    /** @type {string} */
    postalCode;
    /** @type {string} */
    timeZone;
    /** @type {string} */
    requestTokenSecret;
    /** @type {string} */
    createdAt;
    /** @type {string} */
    lastModified;
    /** @type {string[]} */
    roles;
    /** @type {string[]} */
    permissions;
    /** @type {boolean} */
    isAuthenticated;
    /** @type {boolean} */
    fromToken;
    /** @type {string} */
    profileUrl;
    /** @type {string} */
    sequence;
    /** @type {number} */
    tag;
    /** @type {string} */
    authProvider;
    /** @type {IAuthTokens[]} */
    providerOAuthAccess;
    /** @type {{ [index: string]: string; }} */
    meta;
    /** @type {string[]} */
    audiences;
    /** @type {string[]} */
    scopes;
    /** @type {string} */
    dns;
    /** @type {string} */
    rsa;
    /** @type {string} */
    sid;
    /** @type {string} */
    hash;
    /** @type {string} */
    homePhone;
    /** @type {string} */
    mobilePhone;
    /** @type {string} */
    webpage;
    /** @type {?boolean} */
    emailConfirmed;
    /** @type {?boolean} */
    phoneNumberConfirmed;
    /** @type {?boolean} */
    twoFactorEnabled;
    /** @type {string} */
    securityStamp;
    /** @type {string} */
    type;
    /** @type {string} */
    recoveryToken;
    /** @type {?number} */
    refId;
    /** @type {string} */
    refIdStr;
}
export class CreateJwtResponse {
    /** @param {{token?:string,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    token;
    /** @type {ResponseStatus} */
    responseStatus;
}
export class CreateJwt extends AuthUserSession {
    /** @param {{jwtExpiry?: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?:string,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?:string,lastModified?:string,roles?:string[],permissions?:string[],isAuthenticated?:boolean,fromToken?:boolean,profileUrl?:string,sequence?:string,tag?:number,authProvider?:string,providerOAuthAccess?:IAuthTokens[],meta?:{ [index: string]: string; },audiences?:string[],scopes?:string[],dns?:string,rsa?:string,sid?:string,hash?:string,homePhone?:string,mobilePhone?:string,webpage?:string,emailConfirmed?:boolean,phoneNumberConfirmed?:boolean,twoFactorEnabled?:boolean,securityStamp?:string,type?:string,recoveryToken?:string,refId?:number,refIdStr?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?string} */
    jwtExpiry;
}

JavaScript CreateJwt DTOs

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

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	jwtExpiry: 0001-01-01,
	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
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	token: String,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}