File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
LineSDKObjCInterfaceTests Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,17 @@ public class LineSDKLoginManagerParameters: NSObject {
44
44
get { return _value. promptBotID }
45
45
set { _value. promptBotID = newValue }
46
46
}
47
-
47
+
48
+ public var initialWebAuthenticationMethod : LineSDKLoginManagerWebAuthenticationMethod {
49
+ get { return LineSDKLoginManagerWebAuthenticationMethod ( _value. initialWebAuthenticationMethod) }
50
+ set { _value. initialWebAuthenticationMethod = newValue. _value }
51
+ }
52
+
48
53
public var preferredWebPageLanguage : String ? {
49
54
get { return _value. preferredWebPageLanguage? . rawValue }
50
55
set { _value. preferredWebPageLanguage = newValue. map { . init( rawValue: $0) } }
51
56
}
52
-
57
+
53
58
public var IDTokenNonce : String ? {
54
59
get { return _value. IDTokenNonce }
55
60
set { _value. IDTokenNonce = newValue }
@@ -67,3 +72,15 @@ public class LineSDKLoginManagerBotPrompt: NSObject {
67
72
68
73
public var rawValue : String { return _value. rawValue }
69
74
}
75
+
76
+ @objcMembers
77
+ public class LineSDKLoginManagerWebAuthenticationMethod : NSObject {
78
+
79
+ let _value : LoginManager . WebAuthenticationMethod
80
+ init ( _ value: LoginManager . WebAuthenticationMethod ) { _value = value }
81
+
82
+ public static let email = LineSDKLoginManagerWebAuthenticationMethod ( . email)
83
+ public static let qrCode = LineSDKLoginManagerWebAuthenticationMethod ( . qrCode)
84
+
85
+ public var rawValue : String { return _value. rawValue }
86
+ }
Original file line number Diff line number Diff line change @@ -104,11 +104,13 @@ - (void)testLoginManagerParametersInterface {
104
104
param.preferredWebPageLanguage = @" ja" ;
105
105
param.IDTokenNonce = @" test" ;
106
106
param.promptBotID = @" @abc123" ;
107
-
107
+ param.initialWebAuthenticationMethod = [LineSDKLoginManagerWebAuthenticationMethod qrCode ];
108
+
108
109
XCTAssertTrue ([param onlyWebLogin ]);
109
110
XCTAssertTrue ([[param.botPromptStyle rawValue ] isEqualToString: @" normal" ]);
110
111
XCTAssertTrue ([param.preferredWebPageLanguage isEqualToString: @" ja" ]);
111
112
XCTAssertTrue ([param.IDTokenNonce isEqualToString: @" test" ]);
113
+ XCTAssertTrue ([[param.initialWebAuthenticationMethod rawValue ] isEqualToString: @" qrCode" ]);
112
114
}
113
115
114
116
- (void )testLoginResultInterface {
You can’t perform that action at this time.
0 commit comments