//
//  RefreshTokenHttpPostCmd.m
//  MobilePortal
//
//  Created by caiyang on 2021/1/4.
//  Copyright © 2021 yin chen. All rights reserved.
//

#import "RefreshTokenHttpPostCmd.h"
#import "RefeshTokenHttpResult.h"

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

@implementation RefreshTokenHttpPostCmd


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

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

- (NSString *)getActionUrl{
    
    return kActionUrl1;
}

@end
NSString *const kHttpRefreshTokenHttpPostCmd_appId = @"appId";
NSString *const kHttpRefreshTokenHttpPostCmd_token = @"token";
NSString *const kHttpRefreshTokenHttpPostCmd_username = @"username";
NSString *const kHttpRefreshTokenHttpPostCmd_remoteIp = @"remoteIp";
