diff --git a/openstack/identity/v2/requests.go b/openstack/identity/v2/requests.go
index dbd367e..d027962 100644
--- a/openstack/identity/v2/requests.go
+++ b/openstack/identity/v2/requests.go
@@ -2,6 +2,7 @@
 
 import (
 	"github.com/racker/perigee"
+	"github.com/rackspace/gophercloud"
 )
 
 // AuthResults encapsulates the raw results from an authentication request.
@@ -11,60 +12,25 @@
 // such as ServiceCatalog() and Token().
 type AuthResults map[string]interface{}
 
-// AuthOptions lets anyone calling Authenticate() supply the required access
-// credentials.  At present, only Identity V2 API support exists; therefore,
-// only Username, Password, and optionally, TenantId are provided.  If future
-// Identity API versions become available, alternative fields unique to those
-// versions may appear here.
-//
-// Endpoint specifies the HTTP endpoint offering the Identity V2 API.
-// Required.
-//
-// Username is required if using Identity V2 API.  Consult with your provider's
-// control panel to discover your account's username.
-//
-// At most one of Password or ApiKey is required if using Identity V2 API.
-// Consult with your provider's control panel to discover your account's
-// preferred method of authentication.
-//
-// The TenantId and TenantName fields are optional for the Identity V2 API.
-// Some providers allow you to specify a TenantName instead of the TenantId.
-// Some require both.  Your provider's authentication policies will determine
-// how these fields influence authentication.
-//
-// AllowReauth should be set to true if you grant permission for Gophercloud to
-// cache your credentials in memory, and to allow Gophercloud to attempt to
-// re-authenticate automatically if/when your token expires.  If you set it to
-// false, it will not cache these settings, but re-authentication will not be
-// possible.  This setting defaults to false.
-type AuthOptions struct {
-	Endpoint         string
-	Username         string
-	Password, ApiKey string
-	TenantId         string
-	TenantName       string
-	AllowReauth      bool
-}
-
 // Authenticate passes the supplied credentials to the OpenStack provider for authentication.
 // If successful, the caller may use Token() to retrieve the authentication token,
 // and ServiceCatalog() to retrieve the set of services available to the API user.
-func Authenticate(options AuthOptions) (AuthResults, error) {
+func Authenticate(service gophercloud.ServiceClient, options gophercloud.AuthOptions) (AuthResults, error) {
 	type AuthContainer struct {
 		Auth auth `json:"auth"`
 	}
 
 	var ar AuthResults
 
-	if options.Endpoint == "" {
+	if options.IdentityEndpoint == "" {
 		return nil, ErrEndpoint
 	}
 
-	if (options.Username == "") || (options.Password == "" && options.ApiKey == "") {
+	if (options.Username == "") || (options.Password == "" && options.APIKey == "") {
 		return nil, ErrCredentials
 	}
 
-	url := options.Endpoint + "/tokens"
+	url := options.IdentityEndpoint + "/tokens"
 	err := perigee.Post(url, perigee.Options{
 		ReqBody: &AuthContainer{
 			Auth: getAuthCredentials(options),
@@ -74,8 +40,8 @@
 	return ar, err
 }
 
-func getAuthCredentials(options AuthOptions) auth {
-	if options.ApiKey == "" {
+func getAuthCredentials(options gophercloud.AuthOptions) auth {
+	if options.APIKey == "" {
 		return auth{
 			PasswordCredentials: &struct {
 				Username string `json:"username"`
@@ -84,35 +50,35 @@
 				Username: options.Username,
 				Password: options.Password,
 			},
-			TenantId:   options.TenantId,
+			TenantID:   options.TenantID,
 			TenantName: options.TenantName,
 		}
-	} else {
-		return auth{
-			ApiKeyCredentials: &struct {
-				Username string `json:"username"`
-				ApiKey   string `json:"apiKey"`
-			}{
-				Username: options.Username,
-				ApiKey:   options.ApiKey,
-			},
-			TenantId:   options.TenantId,
-			TenantName: options.TenantName,
-		}
+	}
+	return auth{
+		APIKeyCredentials: &struct {
+			Username string `json:"username"`
+			APIKey   string `json:"apiKey"`
+		}{
+			Username: options.Username,
+			APIKey:   options.APIKey,
+		},
+		TenantID:   options.TenantID,
+		TenantName: options.TenantName,
 	}
 }
 
 type auth struct {
 	PasswordCredentials interface{} `json:"passwordCredentials,omitempty"`
-	ApiKeyCredentials   interface{} `json:"RAX-KSKEY:apiKeyCredentials,omitempty"`
-	TenantId            string      `json:"tenantId,omitempty"`
+	APIKeyCredentials   interface{} `json:"RAX-KSKEY:apiKeyCredentials,omitempty"`
+	TenantID            string      `json:"tenantId,omitempty"`
 	TenantName          string      `json:"tenantName,omitempty"`
 }
 
-func GetExtensions(options AuthOptions) (ExtensionsResult, error) {
+// GetExtensions returns the OpenStack extensions available from this service.
+func GetExtensions(options gophercloud.AuthOptions) (ExtensionsResult, error) {
 	var exts ExtensionsResult
 
-	url := options.Endpoint + "/extensions"
+	url := options.IdentityEndpoint + "/extensions"
 	err := perigee.Get(url, perigee.Options{
 		Results: &exts,
 	})
