Skip to content

Commit

Permalink
Merge pull request #73 from okta/dev
Browse files Browse the repository at this point in the history
Release 1.3.0
  • Loading branch information
IldarAbdullin-okta authored May 28, 2019
2 parents ad9c2dd + f0f0ed1 commit b3e9c62
Show file tree
Hide file tree
Showing 36 changed files with 848 additions and 212 deletions.
42 changes: 21 additions & 21 deletions OktaAuthNative.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
2F32C9D8229417DA003A6768 /* OktaAuthStatusUnauthenticatedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F32C9D7229417DA003A6768 /* OktaAuthStatusUnauthenticatedTests.swift */; };
2F32C9DA229422CF003A6768 /* TypesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F32C9D9229422CF003A6768 /* TypesTests.swift */; };
2F32C9DC2295419E003A6768 /* AuthStateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F32C9DB2295419E003A6768 /* AuthStateTests.swift */; };
2F7C3B782268AF1E00A62FD4 /* OktaModelsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F7C3B6E2268AF1500A62FD4 /* OktaModelsTests.swift */; };
2F7C3B792268AF2400A62FD4 /* OktaAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F7C3B702268AF1500A62FD4 /* OktaAPITests.swift */; };
2F7C3B7A2268AF2800A62FD4 /* OktaAPIRequestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F7C3B712268AF1500A62FD4 /* OktaAPIRequestTests.swift */; };
Expand Down Expand Up @@ -44,9 +47,7 @@
2F8155A52271F352009FA6C5 /* OktaAuthStatusLockedOutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F8155A42271F352009FA6C5 /* OktaAuthStatusLockedOutTests.swift */; };
2F8155A72271F6DC009FA6C5 /* OktaAuthStatePasswordResetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F8155A62271F6DC009FA6C5 /* OktaAuthStatePasswordResetTests.swift */; };
2F8D79F421D6601600CFDF12 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 2F8D79F321D6601600CFDF12 /* README.md */; };
2FF5C85221D1078E00EECA75 /* PrimaryAuthResponse in Resources */ = {isa = PBXBuildFile; fileRef = 2FF5C85121D1078E00EECA75 /* PrimaryAuthResponse */; };
2FF5C85921D3A9E700EECA75 /* OperationNotAllowedError in Resources */ = {isa = PBXBuildFile; fileRef = 2FF5C85721D3A9E200EECA75 /* OperationNotAllowedError */; };
2FF5C85C21D3B04D00EECA75 /* PrimaryAuthFactorsResponse in Resources */ = {isa = PBXBuildFile; fileRef = 2FF5C85A21D3AEEC00EECA75 /* PrimaryAuthFactorsResponse */; };
2FF5C85E21D3B15000EECA75 /* AuthenticationFailedError in Resources */ = {isa = PBXBuildFile; fileRef = 2FF5C85D21D3B15000EECA75 /* AuthenticationFailedError */; };
A12F4FF92238311A00DB9147 /* OktaAuthSdk.swift in Sources */ = {isa = PBXBuildFile; fileRef = A12F4FF82238311A00DB9147 /* OktaAuthSdk.swift */; };
A12F4FFA2238311A00DB9147 /* OktaAuthSdk.swift in Sources */ = {isa = PBXBuildFile; fileRef = A12F4FF82238311A00DB9147 /* OktaAuthSdk.swift */; };
Expand Down Expand Up @@ -122,9 +123,8 @@
A1E7469F2283819700C48A28 /* MFA_ENROLL_ACTIVATE_CALL in Resources */ = {isa = PBXBuildFile; fileRef = A1E7469E2283819700C48A28 /* MFA_ENROLL_ACTIVATE_CALL */; };
A1E746A0228381D400C48A28 /* MFA_ENROLL_ACTIVATE_CALL in Resources */ = {isa = PBXBuildFile; fileRef = A1E7469E2283819700C48A28 /* MFA_ENROLL_ACTIVATE_CALL */; };
A1E746A22283830F00C48A28 /* OktaFactorOtherTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1E746A12283830F00C48A28 /* OktaFactorOtherTests.swift */; };
A1F9E5922298729100924F7A /* MFA_ENROLL_ACTIVATE_TOTP in Resources */ = {isa = PBXBuildFile; fileRef = A1F9E5912298729100924F7A /* MFA_ENROLL_ACTIVATE_TOTP */; };
A1F9E594229888BC00924F7A /* SUCCESS_UNLOCK in Resources */ = {isa = PBXBuildFile; fileRef = A1F9E593229888BC00924F7A /* SUCCESS_UNLOCK */; };
A1F9E5962298895600924F7A /* OktaAuthStatusSuccessTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1F9E5952298895500924F7A /* OktaAuthStatusSuccessTests.swift */; };
A1F9E599229DD7A400924F7A /* MFA_ENROLL_ACTIVATE_TOTP in Resources */ = {isa = PBXBuildFile; fileRef = A1F9E597229DD7A400924F7A /* MFA_ENROLL_ACTIVATE_TOTP */; };
A1F9E59A229DD7A400924F7A /* SUCCESS_UNLOCK in Resources */ = {isa = PBXBuildFile; fileRef = A1F9E598229DD7A400924F7A /* SUCCESS_UNLOCK */; };
A1FCB12F220A458F0026F522 /* OktaAPIMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1FCB12E220A458F0026F522 /* OktaAPIMock.swift */; };
FA4ED9A021C1499200A065A1 /* OktaAuth_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4ED99E21C1499200A065A1 /* OktaAuth_iOS.h */; settings = {ATTRIBUTES = (Public, ); }; };
FA4ED9AA21C2895B00A065A1 /* OktaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA4ED9A921C2895B00A065A1 /* OktaError.swift */; };
Expand All @@ -142,6 +142,9 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
2F32C9D7229417DA003A6768 /* OktaAuthStatusUnauthenticatedTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaAuthStatusUnauthenticatedTests.swift; sourceTree = "<group>"; };
2F32C9D9229422CF003A6768 /* TypesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypesTests.swift; sourceTree = "<group>"; };
2F32C9DB2295419E003A6768 /* AuthStateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthStateTests.swift; sourceTree = "<group>"; };
2F7C3B6E2268AF1500A62FD4 /* OktaModelsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OktaModelsTests.swift; sourceTree = "<group>"; };
2F7C3B702268AF1500A62FD4 /* OktaAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OktaAPITests.swift; sourceTree = "<group>"; };
2F7C3B712268AF1500A62FD4 /* OktaAPIRequestTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OktaAPIRequestTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -179,9 +182,7 @@
2F8155A42271F352009FA6C5 /* OktaAuthStatusLockedOutTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaAuthStatusLockedOutTests.swift; sourceTree = "<group>"; };
2F8155A62271F6DC009FA6C5 /* OktaAuthStatePasswordResetTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaAuthStatePasswordResetTests.swift; sourceTree = "<group>"; };
2F8D79F321D6601600CFDF12 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
2FF5C85121D1078E00EECA75 /* PrimaryAuthResponse */ = {isa = PBXFileReference; explicitFileType = text.json; path = PrimaryAuthResponse; sourceTree = "<group>"; };
2FF5C85721D3A9E200EECA75 /* OperationNotAllowedError */ = {isa = PBXFileReference; explicitFileType = text.json; path = OperationNotAllowedError; sourceTree = "<group>"; };
2FF5C85A21D3AEEC00EECA75 /* PrimaryAuthFactorsResponse */ = {isa = PBXFileReference; explicitFileType = text.json; path = PrimaryAuthFactorsResponse; sourceTree = "<group>"; };
2FF5C85D21D3B15000EECA75 /* AuthenticationFailedError */ = {isa = PBXFileReference; lastKnownFileType = text; path = AuthenticationFailedError; sourceTree = "<group>"; };
A12F4FF82238311A00DB9147 /* OktaAuthSdk.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaAuthSdk.swift; sourceTree = "<group>"; };
A151096B2281FD3F009AF8EB /* OktaAuthStatusPasswordWarningTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaAuthStatusPasswordWarningTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -225,9 +226,8 @@
A1E7469C22837E7400C48A28 /* OktaFactorCallTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaFactorCallTests.swift; sourceTree = "<group>"; };
A1E7469E2283819700C48A28 /* MFA_ENROLL_ACTIVATE_CALL */ = {isa = PBXFileReference; lastKnownFileType = text; path = MFA_ENROLL_ACTIVATE_CALL; sourceTree = "<group>"; };
A1E746A12283830F00C48A28 /* OktaFactorOtherTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaFactorOtherTests.swift; sourceTree = "<group>"; };
A1F9E5912298729100924F7A /* MFA_ENROLL_ACTIVATE_TOTP */ = {isa = PBXFileReference; lastKnownFileType = text; path = MFA_ENROLL_ACTIVATE_TOTP; sourceTree = "<group>"; };
A1F9E593229888BC00924F7A /* SUCCESS_UNLOCK */ = {isa = PBXFileReference; lastKnownFileType = text; path = SUCCESS_UNLOCK; sourceTree = "<group>"; };
A1F9E5952298895500924F7A /* OktaAuthStatusSuccessTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaAuthStatusSuccessTests.swift; sourceTree = "<group>"; };
A1F9E597229DD7A400924F7A /* MFA_ENROLL_ACTIVATE_TOTP */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MFA_ENROLL_ACTIVATE_TOTP; sourceTree = "<group>"; };
A1F9E598229DD7A400924F7A /* SUCCESS_UNLOCK */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SUCCESS_UNLOCK; sourceTree = "<group>"; };
A1FCB12E220A458F0026F522 /* OktaAPIMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaAPIMock.swift; sourceTree = "<group>"; };
FA4ED99B21C1499200A065A1 /* OktaAuthNative.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OktaAuthNative.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FA4ED99E21C1499200A065A1 /* OktaAuth_iOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OktaAuth_iOS.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -276,6 +276,8 @@
isa = PBXGroup;
children = (
2F7C3B6E2268AF1500A62FD4 /* OktaModelsTests.swift */,
2F32C9D9229422CF003A6768 /* TypesTests.swift */,
2F32C9DB2295419E003A6768 /* AuthStateTests.swift */,
);
path = DomainObjects;
sourceTree = "<group>";
Expand Down Expand Up @@ -304,7 +306,7 @@
A151096B2281FD3F009AF8EB /* OktaAuthStatusPasswordWarningTests.swift */,
A1E746432282050F00C48A28 /* OktaAuthStatusRecoveryChallengeTests.swift */,
A1E746472282359B00C48A28 /* OktaAuthStatusRecoveryTests.swift */,
A1F9E5952298895500924F7A /* OktaAuthStatusSuccessTests.swift */,
2F32C9D7229417DA003A6768 /* OktaAuthStatusUnauthenticatedTests.swift */,
);
path = Statuses;
sourceTree = "<group>";
Expand All @@ -320,9 +322,8 @@
2FF5C85021D1076100EECA75 /* Resources */ = {
isa = PBXGroup;
children = (
A1671552227BA90700E7801D /* Unknown_State_And_FactorResult */,
2FF5C85121D1078E00EECA75 /* PrimaryAuthResponse */,
2FF5C85A21D3AEEC00EECA75 /* PrimaryAuthFactorsResponse */,
A1F9E597229DD7A400924F7A /* MFA_ENROLL_ACTIVATE_TOTP */,
A1F9E598229DD7A400924F7A /* SUCCESS_UNLOCK */,
2FF5C85721D3A9E200EECA75 /* OperationNotAllowedError */,
2FF5C85D21D3B15000EECA75 /* AuthenticationFailedError */,
2F7C3B812268CE3A00A62FD4 /* MFA_ENROLL_NotEnrolled */,
Expand All @@ -343,8 +344,7 @@
A1E74645228207A800C48A28 /* RECOVERY_CHALLENGE_EMAIL */,
A1E7465522834B9800C48A28 /* Questions */,
A1E7469E2283819700C48A28 /* MFA_ENROLL_ACTIVATE_CALL */,
A1F9E5912298729100924F7A /* MFA_ENROLL_ACTIVATE_TOTP */,
A1F9E593229888BC00924F7A /* SUCCESS_UNLOCK */,
A1671552227BA90700E7801D /* Unknown_State_And_FactorResult */,
);
path = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -579,12 +579,13 @@
buildActionMask = 2147483647;
files = (
A1E746A0228381D400C48A28 /* MFA_ENROLL_ACTIVATE_CALL in Resources */,
A1F9E599229DD7A400924F7A /* MFA_ENROLL_ACTIVATE_TOTP in Resources */,
A1E74657228355FA00C48A28 /* Questions in Resources */,
2F8155952270B85B009FA6C5 /* RECOVERY in Resources */,
A1C06F16221E0037005E8369 /* PASSWORD_WARN in Resources */,
A1F9E59A229DD7A400924F7A /* SUCCESS_UNLOCK in Resources */,
2F8155992270B8AB009FA6C5 /* PASSWORD_RESET in Resources */,
A1C06F14221DFFD8005E8369 /* PASSWORD_EXPIRED in Resources */,
2FF5C85C21D3B04D00EECA75 /* PrimaryAuthFactorsResponse in Resources */,
2F8155972270B878009FA6C5 /* RECOVERY_CHALLENGE_SMS in Resources */,
2F7C3BC2226DED2300A62FD4 /* MFA_ENROLL_ACTIVATE_Push in Resources */,
2F7C3BC4226DED2300A62FD4 /* MFA_CHALLENGE_SMS in Resources */,
Expand All @@ -593,14 +594,11 @@
2F8155932270B740009FA6C5 /* LOCKED_OUT in Resources */,
2F7C3BBF226DED2300A62FD4 /* MFA_ENROLL_NotEnrolled in Resources */,
2FF5C85921D3A9E700EECA75 /* OperationNotAllowedError in Resources */,
A1F9E594229888BC00924F7A /* SUCCESS_UNLOCK in Resources */,
A1671554227BA90700E7801D /* Unknown_State_And_FactorResult in Resources */,
2F7C3BC0226DED2300A62FD4 /* MFA_ENROLL_PartiallyEnrolled in Resources */,
2F7C3BC1226DED2300A62FD4 /* MFA_ENROLL_ACTIVATE_SMS in Resources */,
2F7C3BC5226DED2300A62FD4 /* MFA_CHALLENGE_TOTP in Resources */,
2F7C3BBE226DED1E00A62FD4 /* MFA_CHALLENGE_WAITING_PUSH in Resources */,
2FF5C85221D1078E00EECA75 /* PrimaryAuthResponse in Resources */,
A1F9E5922298729100924F7A /* MFA_ENROLL_ACTIVATE_TOTP in Resources */,
A1E74646228207A800C48A28 /* RECOVERY_CHALLENGE_EMAIL in Resources */,
2F7C3BBD226DED1B00A62FD4 /* SUCCESS in Resources */,
);
Expand Down Expand Up @@ -659,9 +657,11 @@
A151096D2281FD3F009AF8EB /* OktaAuthStatusPasswordWarningTests.swift in Sources */,
A1920FDF22615B2E007D50D2 /* OktaModels.swift in Sources */,
A1920FC422615A97007D50D2 /* OktaAuthStatus.swift in Sources */,
2F32C9DC2295419E003A6768 /* AuthStateTests.swift in Sources */,
A1920FB522615A97007D50D2 /* OktaAuthStatusResponseHandler.swift in Sources */,
2F8155A32271EEC1009FA6C5 /* OktaAuthStatusPasswordExpiredTests.swift in Sources */,
2F7C3BBA226DE40200A62FD4 /* TestResponse.swift in Sources */,
2F32C9D8229417DA003A6768 /* OktaAuthStatusUnauthenticatedTests.swift in Sources */,
A1920FD922615AE5007D50D2 /* OktaAPIRequest.swift in Sources */,
2F7C3BD0226F459C00A62FD4 /* OktaFactorTestCase.swift in Sources */,
A1920FE522615B2E007D50D2 /* Types.swift in Sources */,
Expand All @@ -673,7 +673,6 @@
A1E746A22283830F00C48A28 /* OktaFactorOtherTests.swift in Sources */,
A1920FC122615A97007D50D2 /* OktaAuthStatusPasswordWarning.swift in Sources */,
A1920FA622615A97007D50D2 /* OktaAuthStatusRecoveryChallenge.swift in Sources */,
A1F9E5962298895600924F7A /* OktaAuthStatusSuccessTests.swift in Sources */,
2F7C3B7E2268B83400A62FD4 /* OktaFactorPushTests.swift in Sources */,
A1E746482282359B00C48A28 /* OktaAuthStatusRecoveryTests.swift in Sources */,
2F7C3B7A2268AF2800A62FD4 /* OktaAPIRequestTests.swift in Sources */,
Expand All @@ -684,6 +683,7 @@
2F7C3BCB226F40C800A62FD4 /* OktaFactorTotpTests.swift in Sources */,
2F7C3BC9226F40BA00A62FD4 /* OktaFactorSmsTests.swift in Sources */,
A1920FAF22615A97007D50D2 /* OktaAuthStatusUnauthenticated.swift in Sources */,
2F32C9DA229422CF003A6768 /* TypesTests.swift in Sources */,
2F81558F22708B23009FA6C5 /* OktaAuthStatusResponseHandlerMock.swift in Sources */,
A1920F95225E8478007D50D2 /* OktaFactorOther.swift in Sources */,
A183359A2239A86D007C6175 /* OktaError.swift in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion OktaAuthSdk.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'OktaAuthSdk'
s.version = '1.2.0'
s.version = '1.3.0'
s.summary = 'SDK for Okta native authentication.'
s.description = <<-DESC
Integrate your native app with Okta.
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,19 @@ If you do not already have a **Developer Edition Account**, you can create one a

## Getting started

### CocoaPods
This SDK is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:

```ruby
pod "OktaAuthSdk"
```

### Carthage
To integrate this SDK into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your Cartfile:
```ruby
github "okta/okta-auth-swift"
```

## Usage guide

The Authentication SDK helps you build the following flows using your own UI elements:
Expand Down
7 changes: 4 additions & 3 deletions Source/DomainObjects/AuthState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public enum AuthStatus {
}

public extension AuthStatus {
public init(raw: String) {
init(raw: String) {
switch raw {
case "UNAUTHENTICATED":
self = .unauthenticated
Expand Down Expand Up @@ -60,7 +60,7 @@ public extension AuthStatus {
}
}

public var rawValue: String {
var rawValue: String {
switch self {
case .unauthenticated:
return "UNAUTHENTICATED"
Expand Down Expand Up @@ -91,7 +91,8 @@ public extension AuthStatus {
}
}

public var description: String {
@available(swift, deprecated: 1.2, obsoleted: 2.0, message: "This will be removed in v2.0. Please use rawValue instead.")
var description: String {
switch self {
case .unauthenticated:
return "Unauthenticated"
Expand Down
8 changes: 3 additions & 5 deletions Source/DomainObjects/OktaModels.swift
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public struct EmbeddedResponse: Codable {
}

public extension OktaAPISuccessResponse.FactorResult {
public init(raw: String) {
init(raw: String) {
switch raw {
case "SUCCESS":
self = .success
Expand All @@ -354,9 +354,7 @@ public extension OktaAPISuccessResponse.FactorResult {
self = .unknown(raw)
}
}
}

public extension OktaAPISuccessResponse.FactorResult {
var rawValue: String {
switch self {
case .success:
Expand Down Expand Up @@ -401,7 +399,7 @@ extension OktaAPISuccessResponse.FactorResult : Codable {
}

public extension OktaAPISuccessResponse.RecoveryType {
public init(raw: String) {
init(raw: String) {
switch raw {
case "PASSWORD":
self = .password
Expand Down Expand Up @@ -442,7 +440,7 @@ extension OktaAPISuccessResponse.RecoveryType : Codable {
}

public extension EmbeddedResponse.AuthenticationObject.AuthProtocol {
public init(raw: String) {
init(raw: String) {
switch raw {
case "SAML2.0":
self = .saml_2_0
Expand Down
21 changes: 11 additions & 10 deletions Source/DomainObjects/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public enum FactorType {
}

public extension FactorType {
public init(raw: String) {
init(raw: String) {
switch raw {
case "question":
self = .question
Expand All @@ -43,7 +43,7 @@ public extension FactorType {
self = .token
case "token:hardware":
self = .tokenHardware
case "web":
case "web", "Web":
self = .web
case "u2f":
self = .u2f
Expand Down Expand Up @@ -73,17 +73,18 @@ public extension FactorType {
case .tokenHardware:
return "token:hardware"
case .web:
return "Web"
return "web"
case .u2f:
return "u2f"
case .email:
return "email"
case .unknown(_):
return "unknown"
case .unknown(let raw):
return raw
}
}
}

@available(swift, deprecated: 1.2, obsoleted: 2.0, message: "This will be removed in v2.0. Please use rawValue instead.")
public extension FactorType {
var description: String {
switch self {
Expand All @@ -107,8 +108,8 @@ public extension FactorType {
return "U2F"
case .email:
return "Email"
case .unknown(_):
return "unknown"
case .unknown(let raw):
return raw
}
}
}
Expand Down Expand Up @@ -140,7 +141,7 @@ public enum FactorProvider {
}

public extension FactorProvider {
public init(raw: String) {
init(raw: String) {
switch raw {
case "OKTA":
self = .okta
Expand Down Expand Up @@ -179,8 +180,8 @@ public extension FactorProvider {
return "DUO"
case .fido:
return "FIDO"
case .unknown(_):
return "unknown"
case .unknown(let raw):
return raw
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<string>1.3.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
4 changes: 4 additions & 0 deletions Source/OktaError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,8 @@ public extension OktaError {
return "Invalid parameters"
}
}

var localizedDescription: String {
return NSLocalizedString(self.description, comment: "")
}
}
Loading

0 comments on commit b3e9c62

Please sign in to comment.