| GET,PUT,POST,OPTIONS | /v1/userverifymfatype |
|---|
import Foundation
import ServiceStack
public class UserVerifyMfaTypeRequest : Codable
{
public var userId:String
required public init(){}
}
public class AwsAuthResponse : Codable
{
public var responseStatus:ResponseStatus
public var initiateAuthResponse:InitiateAuthResponse
public var success:Bool
required public init(){}
}
public class InitiateAuthResponse : AmazonWebServiceResponse
{
public var authenticationResult:AuthenticationResultType
public var challengeName:ChallengeNameType
public var challengeParameters:[String:String] = [:]
public var session:String
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case authenticationResult
case challengeName
case challengeParameters
case session
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
authenticationResult = try container.decodeIfPresent(AuthenticationResultType.self, forKey: .authenticationResult)
challengeName = try container.decodeIfPresent(ChallengeNameType.self, forKey: .challengeName)
challengeParameters = try container.decodeIfPresent([String:String].self, forKey: .challengeParameters) ?? [:]
session = try container.decodeIfPresent(String.self, forKey: .session)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if authenticationResult != nil { try container.encode(authenticationResult, forKey: .authenticationResult) }
if challengeName != nil { try container.encode(challengeName, forKey: .challengeName) }
if challengeParameters.count > 0 { try container.encode(challengeParameters, forKey: .challengeParameters) }
if session != nil { try container.encode(session, forKey: .session) }
}
}
public class AmazonWebServiceResponse : Codable
{
public var responseMetadata:ResponseMetadata
public var contentLength:Int
public var httpStatusCode:HttpStatusCode
required public init(){}
}
public class ResponseMetadata : Codable
{
public var requestId:String
public var metadata:[String:String]
public var checksumAlgorithm:CoreChecksumAlgorithm
public var checksumValidationStatus:ChecksumValidationStatus
required public init(){}
}
public enum CoreChecksumAlgorithm : String, Codable
{
case NONE
case CRC32C
case CRC32
case SHA256
case SHA1
}
public enum ChecksumValidationStatus : String, Codable
{
case NOT_VALIDATED
case PENDING_RESPONSE_READ
case SUCCESSFUL
case INVALID
}
public class AuthenticationResultType : Codable
{
public var accessToken:String
public var expiresIn:Int
public var idToken:String
public var newDeviceMetadata:NewDeviceMetadataType
public var refreshToken:String
public var tokenType:String
required public init(){}
}
public class NewDeviceMetadataType : Codable
{
public var deviceGroupKey:String
public var deviceKey:String
required public init(){}
}
public class ChallengeNameType : ConstantClass
{
required public init(){ super.init() }
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
}
}
public class ConstantClass : Codable
{
public var value:String
required public init(){}
}
Swift UserVerifyMfaTypeRequest DTOs
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/userverifymfatype HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
UserId: 00000000000000000000000000000000
}
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
}