     }
 }
 
-public struct APIToken
+@objc
+public class APIToken : NSObject
 {
     var refreshToken:String
     var tokenType:String

    
    public static func clearAuthentication()
    {
        self.set(object: nil, for: .emailKey)
        self.set(object: nil, for: .refreshTokenKey)
        self.set(object: nil, for: .tokenTypeKey)
        self.set(object: nil, for: .accessTokenKey)
        self.set(object: nil, for: .expiresKey)
        self.set(object: nil, for: .scopeKey)
    }
    
    private static func accessTokeKey(for email:String) -> String {
        if let bundleExecutable = Bundle.main.infoDictionary?["CFBundleExecutable"] as? NSString {
            return "\(email)@com.makespace.\(bundleExecutable).access"
        }
        return email
    }
    private static func refreshTokeKey(for email:String) -> String {
        if let bundleExecutable = Bundle.main.infoDictionary?["CFBundleExecutable"] as? NSString {
            return "\(email)@com.makespace.\(bundleExecutable).access"
        }
        return email
    }

    var expiresIn:Int
    var scope:String
    var email:String
    
    public init(refreshToken: String,
                tokenType: String,
                accessToken: String,
                expiresIn: Int,
                scope: String,
                email: String) {
        
        self.refreshToken = refreshToken
        self.tokenType = tokenType
        self.accessToken = accessToken
        self.expiresIn = expiresIn
        self.scope = scope
        self.email = email
    }
}

@objc
open class APITokenManager : NSObject
{
    public static var currentToken:APIToken? {
        if let email = self.object(for: .emailKey) as? String,
