 A handy Keychain wrapper. It saves your OAuth2 tokens using WhenPasscodeSet ACL.
 */
 public class KeychainWrap {
-    
+
     /**
     The service id. By default set to apple bundle id.
     */
     public var serviceIdentifier: String
-    
+
     /**
     The group id is Keychain access group which is used for sharing keychain content accross multiple apps issued from same developer. By default there is no access group.
     */
     public var groupId: String?
-    
+
     /**
     Initialize KeychainWrapper setting default values.
-    
+
     :param: serviceId unique service, defulated to bundleId
     :param: groupId used for SSO between app issued from same developer certificate.
     */

            self.deleteAllKeysForSecClass(kSecClassKey) &&
            self.deleteAllKeysForSecClass(kSecClassIdentity)
    }
    
    func deleteAllKeysForSecClass(secClass: CFTypeRef) -> Bool {
        let keychainQuery = NSMutableDictionary()
        keychainQuery[kSecClass as String] = secClass

            print("Error attempting to retrieve \(tokenType.rawValue) with error code \(status) ")
            return nil
        }

        let opaque = dataTypeRef?.toOpaque()
        var contentsOfKeychain: String?
        if let op = opaque {
            let retrievedData = Unmanaged<NSData>.fromOpaque(op).takeUnretainedValue()

            // Convert the data retrieved from the keychain into a string
            contentsOfKeychain = NSString(data: retrievedData, encoding: NSUTF8StringEncoding) as? String
        } else {
            print("Nothing was retrieved from the keychain. Status code \(status)")
        }

        return contentsOfKeychain
    }

    /**
    Clear all keychain entries. Note that Keychain can only be cleared progemmatically.
    */
