| GET,PUT,POST,OPTIONS | /v1/AwsAuth |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CRM.AgencyPlatform.API.Internal;
using Amazon.CognitoIdentityProvider.Model;
using Amazon.Runtime;
using Amazon.CognitoIdentityProvider;
namespace Amazon.CognitoIdentityProvider
{
public partial class ChallengeNameType
: ConstantClass
{
}
}
namespace Amazon.CognitoIdentityProvider.Model
{
public partial class AuthenticationResultType
{
public virtual string AccessToken { get; set; }
public virtual int ExpiresIn { get; set; }
public virtual string IdToken { get; set; }
public virtual NewDeviceMetadataType NewDeviceMetadata { get; set; }
public virtual string RefreshToken { get; set; }
public virtual string TokenType { get; set; }
}
public partial class InitiateAuthResponse
: AmazonWebServiceResponse
{
public virtual AuthenticationResultType AuthenticationResult { get; set; }
public virtual ChallengeNameType ChallengeName { get; set; }
public virtual Dictionary<string, string> ChallengeParameters { get; set; } = new();
public virtual string Session { get; set; }
}
public partial class NewDeviceMetadataType
{
public virtual string DeviceGroupKey { get; set; }
public virtual string DeviceKey { get; set; }
}
}
namespace Amazon.Runtime
{
public partial class AmazonWebServiceResponse
{
public virtual ResponseMetadata ResponseMetadata { get; set; }
public virtual long ContentLength { get; set; }
public virtual HttpStatusCode HttpStatusCode { get; set; }
}
public enum ChecksumValidationStatus
{
NOT_VALIDATED,
PENDING_RESPONSE_READ,
SUCCESSFUL,
INVALID,
}
public partial class ConstantClass
{
public virtual string Value { get; set; }
}
public enum CoreChecksumAlgorithm
{
NONE,
CRC32C,
CRC32,
SHA256,
SHA1,
}
public partial class ResponseMetadata
{
public virtual string RequestId { get; set; }
public virtual IDictionary<string, string> Metadata { get; set; }
public virtual CoreChecksumAlgorithm ChecksumAlgorithm { get; set; }
public virtual ChecksumValidationStatus ChecksumValidationStatus { get; set; }
}
}
namespace CRM.AgencyPlatform.API.Internal
{
public partial class AwsAuthRequest
{
public virtual string Username { get; set; }
public virtual string Password { get; set; }
}
public partial class AwsAuthResponse
{
public virtual ResponseStatus ResponseStatus { get; set; }
public virtual InitiateAuthResponse InitiateAuthResponse { get; set; }
public virtual bool Success { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/AwsAuth HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Username: String,
Password: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
InitiateAuthResponse:
{
AuthenticationResult:
{
AccessToken: String,
ExpiresIn: 0,
IdToken: String,
NewDeviceMetadata:
{
DeviceGroupKey: String,
DeviceKey: String
},
RefreshToken: String,
TokenType: String
},
ChallengeParameters:
{
String: String
},
Session: String,
ResponseMetadata:
{
RequestId: String,
Metadata: {},
ChecksumAlgorithm: NONE,
ChecksumValidationStatus: NOT_VALIDATED
},
ContentLength: 0,
HttpStatusCode: Continue
},
Success: False
}