diff --git a/acceptance/08-reauthentication.go b/acceptance/08-reauthentication.go
index 8b198c7..b15e5e0 100644
--- a/acceptance/08-reauthentication.go
+++ b/acceptance/08-reauthentication.go
@@ -10,56 +10,39 @@
 var rgn = flag.String("r", "DFW", "Datacenter region to interrogate.")
 
 func main() {
-	provider, username, password := getCredentials()
 	flag.Parse()
 
-	// Authenticate initially against the service.
-	auth, err := gophercloud.Authenticate(
-		provider,
-		gophercloud.AuthOptions{
-			Username: username,
-			Password: password,
-			AllowReauth: true,		// This enables reauthentication.
-		},
-	)
-	if err != nil {
-		panic(err)
-	}
+	// Invoke withIdentity such that re-auth is enabled.
+	withIdentity(true, func(auth gophercloud.AccessProvider) {
+		token1 := auth.AuthToken()
 
-	// Cache our initial authentication token.
-	token1 := auth.AuthToken()
+		withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+			// Just to confirm everything works, we should be able to list images without error.
+			_, err := servers.ListImages()
+			if err != nil {
+				panic(err)
+			}
 
-	// Acquire access to the cloud servers API.
-	servers, err := gophercloud.ServersApi(auth, gophercloud.ApiCriteria{
-		Name:      "cloudServersOpenStack",
-		Region:    *rgn,
-		VersionId: "2",
-		UrlChoice: gophercloud.PublicURL,
+			// Revoke our current authentication token.
+			auth.Revoke(auth.AuthToken())
+
+			// Attempt to list images again.  This should _succeed_, because we enabled re-authentication.
+			_, err = servers.ListImages()
+			if err != nil {
+				panic(err)
+			}
+
+			// However, our new authentication token should differ.
+			token2 := auth.AuthToken()
+
+			if !*quiet {
+				fmt.Println("Old authentication token: ", token1)
+				fmt.Println("New authentication token: ", token2)
+			}
+
+			if token1 == token2 {
+				panic("Tokens should differ")
+			}
+		})
 	})
-	if err != nil {
-		panic(err)
-	}
-
-	// Just to confirm everything works, we should be able to list images without error.
-	_, err = servers.ListImages()
-	if err != nil {
-		panic(err)
-	}
-
-	// Revoke our current authentication token.
-	auth.Revoke(auth.AuthToken())
-
-	// Attempt to list images again.  This should _succeed_, because we enabled re-authentication.
-	_, err = servers.ListImages()
-	if err != nil {
-		panic(err)
-	}
-
-	// However, our new authentication token should differ.
-	token2 := auth.AuthToken()
-
-	if !*quiet {
-		fmt.Println("Old authentication token: ", token1)
-		fmt.Println("New authentication token: ", token2)
-	}
 }
