GET,POST | /auth/{provider} | ||
---|---|---|---|
GET,POST | /auth |
"use strict";
export class AuthenticateResponse {
/** @param {{UserId?:string,SessionId?:string,UserName?:string,DisplayName?:string,ReferrerUrl?:string,BearerToken?:string,RefreshToken?:string,RefreshTokenExpiry?:string,ProfileUrl?:string,Roles?:string[],Permissions?:string[],ResponseStatus?:ResponseStatus,Meta?:{ [index: string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
UserId;
/** @type {string} */
SessionId;
/** @type {string} */
UserName;
/** @type {string} */
DisplayName;
/** @type {string} */
ReferrerUrl;
/** @type {string} */
BearerToken;
/** @type {string} */
RefreshToken;
/** @type {?string} */
RefreshTokenExpiry;
/** @type {string} */
ProfileUrl;
/** @type {string[]} */
Roles;
/** @type {string[]} */
Permissions;
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {{ [index: string]: string; }} */
Meta;
}
export class Authenticate {
/** @param {{provider?:string,UserName?:string,Password?:string,RememberMe?:boolean,AccessToken?:string,AccessTokenSecret?:string,ReturnUrl?:string,ErrorView?:string,Meta?:{ [index: string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description AuthProvider, e.g. credentials */
provider;
/** @type {string} */
UserName;
/** @type {string} */
Password;
/** @type {?boolean} */
RememberMe;
/** @type {string} */
AccessToken;
/** @type {string} */
AccessTokenSecret;
/** @type {string} */
ReturnUrl;
/** @type {string} */
ErrorView;
/** @type {{ [index: string]: string; }} */
Meta;
}
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /auth/{provider} HTTP/1.1
Host: initiation.sirva.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"provider":"String","UserName":"String","Password":"String","RememberMe":false,"AccessToken":"String","AccessTokenSecret":"String","ReturnUrl":"String","ErrorView":"String","Meta":{"String":"String"}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"UserId":"String","SessionId":"String","UserName":"String","DisplayName":"String","ReferrerUrl":"String","BearerToken":"String","RefreshToken":"String","RefreshTokenExpiry":"\/Date(-62135596800000-0000)\/","ProfileUrl":"String","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"}}