Client_Initiations

<back to all web services

Authenticate

auth

Sign In

The following routes are available for this service:
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;
}

JavaScript Authenticate 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 /auth/{provider} HTTP/1.1 
Host: initiation.sirva.com 
Accept: text/jsv
Content-Type: text/jsv
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: text/jsv
Content-Length: length

{
	UserId: String,
	SessionId: String,
	UserName: String,
	DisplayName: String,
	ReferrerUrl: String,
	BearerToken: String,
	RefreshToken: String,
	RefreshTokenExpiry: 0001-01-01,
	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
	}
}