//
//  SinglePointLoginHttpPostCmd.m
//  MobilePortal
//
//  Created by caiyang on 2020/8/27.
//  Copyright © 2020 yin chen. All rights reserved.
//

#import "SinglePointLoginHttpPostCmd.h"
#import "SinglePointLoginHttpResult.h"


static NSString *kActionUrl1 = @"/Single/authentication";

@implementation SinglePointLoginHttpPostCmd
-(instancetype)initWithVersion:(NSString *)version{
    if ([version isEqualToString:PHttpVersion_v1]) {
        return [[SinglePointLoginHttpPostCmd alloc]initWithAuthorizationState:AuthorizationNull];
    }else{
        NSAssert(NO, @"Invalid version");
    }
    return nil;
}

- (instancetype)initWithAuthorizationState:(AuthorizationState)state{
    self = [super initWithAuthorizationState:state];
    if (self != nil) {
        self.result = [[SinglePointLoginHttpResult alloc]init];
    }
    return self;
}

- (NSString *)getActionUrl{
    
    return kActionUrl1;
}
@end
NSString *const kHttpSinglePointLoginHttpPostCmd_userName = @"userName";
NSString *const kHttpSinglePointLoginHttpPostCmd_passWord = @"passWord";
NSString *const kHttpSinglePointLoginHttpPostCmd_remoteIp = @"remoteIp";
NSString *const kHttpSinglePointLoginHttpPostCmd_authnMethod = @"authnMethod";
NSString *const kHttpSinglePointLoginHttpPostCmd_appId = @"appId";
