Mercedes.Auth.API

<back to all web services

LoginRequest

The following routes are available for this service:
POST/v1/loginProcess GAS Authentication
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Mercedes.Auth.API.ServiceModel;

namespace Mercedes.Auth.API.ServiceModel
{
    public partial class LoginRequest
        : IPost
    {
        ///<summary>
        ///GAS AuthCode
        ///</summary>
        [ApiMember(Description="GAS AuthCode")]
        public virtual string AuthCode { get; set; }

        ///<summary>
        ///GAS ErrorCode
        ///</summary>
        [ApiMember(Description="GAS ErrorCode")]
        public virtual string ErrorCode { get; set; }

        ///<summary>
        ///Client Id
        ///</summary>
        [ApiMember(Description="Client Id")]
        public virtual string ClientId { get; set; }

        ///<summary>
        ///Secret
        ///</summary>
        [ApiMember(Description="Secret")]
        public virtual string Secret { get; set; }

        ///<summary>
        ///Callback Url
        ///</summary>
        [ApiMember(Description="Callback Url")]
        public virtual string CallbackUrl { get; set; }

        ///<summary>
        ///Redirect Url
        ///</summary>
        [ApiMember(Description="Redirect Url")]
        public virtual string RedirectUrl { get; set; }
    }

    public partial class LoginResponse
    {
        public virtual string RedirectUrl { get; set; }
        public virtual bool IsAuthenticated { get; set; }
        public virtual string UserToken { get; set; }
        public virtual string UserId { get; set; }
        public virtual List<int> UserRoleId { get; set; }
        public virtual string DefaultRetailer { get; set; }
        public virtual LoginStatus LoginStatus { get; set; }
        public virtual string UserRoleRedirect { get; set; }
        public virtual string DefaultVehicleType { get; set; }
        public virtual List<string> EntitlementGroup { get; set; }
    }

    public enum LoginStatus
    {
        Authenticated,
        NotAuthenticated,
        Error,
    }

}

C# LoginRequest 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 /v1/login HTTP/1.1 
Host: prod-api-auth-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	AuthCode: String,
	ErrorCode: String,
	ClientId: String,
	Secret: String,
	CallbackUrl: String,
	RedirectUrl: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	RedirectUrl: String,
	IsAuthenticated: False,
	UserToken: String,
	UserId: String,
	UserRoleId: 
	[
		0
	],
	DefaultRetailer: String,
	LoginStatus: Authenticated,
	UserRoleRedirect: String,
	DefaultVehicleType: String,
	EntitlementGroup: 
	[
		String
	]
}