 
 public typealias Parameters = [String:String]
 
+/**
+    Posted when session have access token, but server returs response with 401 HTTP code.
+    Guaranteed to be posted an main thread.
+*/
+public let QuadratSessionDidBecomeUnauthorizedNotification = "QuadratSessionDidBecomeUnauthorizedNotification"
+
 private var _sharedSession : Session?
 
 public class Session {

        return _sharedSession!
    }
    
    public func isAuthorized() -> Bool {
        let keychain = Keychain(configuration: self.configuration)
        let (accessToken, _) = keychain.accessToken()
        return accessToken != nil
    }
    
    public func deauthorize() {
        let keychain = Keychain(configuration: self.configuration)
        keychain.deleteAccessToken()

    
    /**
        One can create custom logger to process all errors and responses in one place.
        Main purpose is to debug or to track all the errors accured in framework via some analytic tool.
    */
    public var logger       : Logger?
    
