Skip to content

Commit

Permalink
Fix al hacer login.
Browse files Browse the repository at this point in the history
  • Loading branch information
matiascamiletti committed Apr 4, 2019
1 parent 1b7a693 commit 302439b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
4 changes: 2 additions & 2 deletions MobileiaAuthenticationCore.podspec
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "MobileiaAuthenticationCore"
s.version = "0.0.5"
s.version = "0.0.6"
s.swift_version = "4.0"
s.summary = "Libreria Authentication Core para MobileIA"

Expand Down Expand Up @@ -82,7 +82,7 @@ Esta la base para la creacion de servicios de autenticacion y librerias que son
# Supports git, hg, bzr, svn and HTTP.
#

s.source = { :git => "https://github.com/MobileIA/mia-authentication-ios.git", :tag => "0.0.5" }
s.source = { :git => "https://github.com/MobileIA/mia-authentication-ios.git", :tag => "0.0.6" }


# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand Down
Expand Up @@ -9,6 +9,11 @@
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>MobileiaAuthenticationCore.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
31 changes: 18 additions & 13 deletions MobileiaAuthenticationCore/Entity/MIAAccessToken.swift
Expand Up @@ -21,27 +21,32 @@ open class MIAAccessToken : Object, Decodable {
return "id"
}

/*enum MIAAccessTokenEnum: String, CodingKey {
enum MIAAccessTokenEnum: String, CodingKey {
case id
case app_id
case user_id
case access_token
}

required convenience init(from decoder: Decoder) throws {
public required convenience init(from decoder: Decoder) throws {
self.init();
let container = try decoder.container(keyedBy: MIAAccessTokenEnum.self);
id = try container.decode(Int.self, forKey: .id)
app_id = try container.decode(Int.self, forKey: .app_id)
user_id = try container.decode(Int.self, forKey: .user_id)
access_token = try container.decode(String.self, forKey: .access_token)
/*do{
//CP_Link = try container.decode(String.self, forKey: .CP_Link)
}catch{}
do{
//CP_Barra = try container.decode(String.self, forKey: .CP_Barra)
}catch{}*/
}*/
id = try container.decode(Int.self, forKey: .id)
}catch{
id = Int(try container.decode(String.self, forKey: .id))!;
}
do{
app_id = try container.decode(Int.self, forKey: .app_id)
}catch{
app_id = Int(try container.decode(String.self, forKey: .app_id))!;
}
do{
user_id = try container.decode(Int.self, forKey: .user_id)
}catch{
user_id = Int(try container.decode(String.self, forKey: .user_id))!;
}
access_token = try container.decode(String.self, forKey: .access_token)
}
}

0 comments on commit 302439b

Please sign in to comment.