diff --git a/client.go b/client.go index b592d33..7078a88 100644 --- a/client.go +++ b/client.go @@ -736,15 +736,18 @@ func sdkV3FromConfig(config ToznySDKJSONConfig) (*ToznySDKV3, error) { type LoginActionData = map[string]string +type IdentitySessionIntermediateResponse = identityClient.IdentitySessionRequestResponse + type TozIDLoginRequest struct { Username string Password string RealmName string APIBaseURL string - LoginHandler func(response *identityClient.IdentitySessionRequestResponse) (LoginActionData, error) + LoginHandler func(response *IdentitySessionIntermediateResponse) (LoginActionData, error) } + //GetSDKV3ForTozIDUser logs in a TozID user and returns the storage client of that user as a ToznySDKV3 func GetSDKV3ForTozIDUser(login TozIDLoginRequest) (*ToznySDKV3, error) { if login.APIBaseURL == "" { diff --git a/identity_test.go b/identity_test.go index 861b82d..0798097 100644 --- a/identity_test.go +++ b/identity_test.go @@ -2,7 +2,6 @@ package e3db import ( "fmt" - "github.com/tozny/e3db-clients-go/identityClient" "testing" ) @@ -21,7 +20,7 @@ func TestToznySDKV3_Login(t *testing.T) { fmt.Printf("%v", sdk) } -func mfaHandler(sessionResponse *identityClient.IdentitySessionRequestResponse) (LoginActionData, error) { +func mfaHandler(sessionResponse *IdentitySessionIntermediateResponse) (LoginActionData, error) { if sessionResponse.LoginActionType == "login-totp" { totpValue := make(map[string]string) totpValue["otp"] = ""