Question: I'm using Alamofire V3 with iOS 9 and I'm doing a simple request as in the README

```
Alamofire.request(.GET, WS_URL)
     .authenticate(user: user, password: password)                       
     .validate(statusCode: 200..<300)
     .responseJSON { response in
         ...
}

```

After a first valid request, I changed the credential with invalid ones and the request succeed, but it should fail.

How can I invalidate previous credentials?

`UPDATE`

I've found a possible solution but I'm not sure that it 's the best one.

```
    let plainString = "\(user):\(password)
    let plainData = plainString.dataUsingEncoding(NSUTF8StringEncoding)
    let base64String = plainData?.base64EncodedStringWithOptions(NSDataBase64EncodingOptions(rawValue: 0))
    let headers = ["Authorization": "Basic " + base64String!]
         Alamofire.request(.GET, urlRequest, headers:  headers)
        .authenticate(usingCredential: self.credential)
        .responseJSON{ responseJson in
            ...
            }

```

Thanks

Answer: 
As written in the [documentation](https://github.com/Alamofire/Alamofire#http-basic-authentication) 

*Depending upon your server implementation, an Authorization header may also be appropriate*
In these cases, the "reset" command is your best friend:

```
 $ git reset --soft HEAD~1

```

Reset will rewind your current HEAD branch to the specified revision. 

**Note the** --soft flag: this makes sure that the changes in undone revisions are preserved. After running the command, you'll find the changes as uncommitted local modifications in your working copy.

If you don't want to keep these changes, simply use the --hard flag. **Be sure to only do this when you're sure you don't need these changes anymore.**

```
$ git reset --hard HEAD~1

```