This repository has been archived by the owner on Mar 8, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from garry-jeromson/master
Add additional optional user profile attributes
- Loading branch information
Showing
5 changed files
with
79 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,9 +39,13 @@ func TestAccUser(t *testing.T) { | |
Check: resource.ComposeTestCheckFunc( | ||
resource.TestCheckResourceAttr("auth0_user.user", "user_id", "auth0|12345"), | ||
resource.TestCheckResourceAttr("auth0_user.user", "email", "[email protected]"), | ||
resource.TestCheckResourceAttr("auth0_user.user", "nickname", "testnick"), | ||
resource.TestCheckResourceAttr("auth0_user.user", "name", "Firstname Lastname"), | ||
resource.TestCheckResourceAttr("auth0_user.user", "family_name", "Lastname"), | ||
resource.TestCheckResourceAttr("auth0_user.user", "given_name", "Firstname"), | ||
resource.TestCheckResourceAttr("auth0_user.user", "nickname", "some.nickname"), | ||
resource.TestCheckResourceAttr("auth0_user.user", "connection_name", "Username-Password-Authentication"), | ||
resource.TestCheckResourceAttr("auth0_user.user", "roles.#", "0"), | ||
resource.TestCheckResourceAttr("auth0_user.user", "picture", "https://www.example.com/a-valid-picture-url.jpg"), | ||
), | ||
}, | ||
{ | ||
|
@@ -67,11 +71,15 @@ provider auth0 {} | |
resource auth0_user user { | ||
connection_name = "Username-Password-Authentication" | ||
username = "test" | ||
username = "unique_username" | ||
user_id = "12345" | ||
email = "[email protected]" | ||
password = "passpass$12$12" | ||
nickname = "testnick" | ||
name = "Firstname Lastname" | ||
given_name = "Firstname" | ||
family_name = "Lastname" | ||
nickname = "some.nickname" | ||
picture = "https://www.example.com/a-valid-picture-url.jpg" | ||
user_metadata = <<EOF | ||
{ | ||
"foo": "bar", | ||
|
@@ -92,11 +100,15 @@ provider auth0 {} | |
resource auth0_user user { | ||
connection_name = "Username-Password-Authentication" | ||
username = "test" | ||
username = "unique_username" | ||
user_id = "12345" | ||
email = "[email protected]" | ||
password = "passpass$12$12" | ||
nickname = "testnick" | ||
name = "Firstname Lastname" | ||
given_name = "Firstname" | ||
family_name = "Lastname" | ||
nickname = "some.nickname" | ||
picture = "https://www.example.com/a-valid-picture-url.jpg" | ||
roles = [ auth0_role.owner.id, auth0_role.admin.id ] | ||
user_metadata = <<EOF | ||
{ | ||
|
@@ -128,11 +140,15 @@ provider auth0 {} | |
resource auth0_user user { | ||
connection_name = "Username-Password-Authentication" | ||
username = "test" | ||
username = "unique_username" | ||
user_id = "12345" | ||
email = "[email protected]" | ||
password = "passpass$12$12" | ||
nickname = "testnick" | ||
name = "Firstname Lastname" | ||
given_name = "Firstname" | ||
family_name = "Lastname" | ||
nickname = "some.nickname" | ||
picture = "https://www.example.com/a-valid-picture-url.jpg" | ||
roles = [ auth0_role.admin.id ] | ||
user_metadata = <<EOF | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,13 @@ provider "auth0" {} | |
resource "auth0_user" "user" { | ||
connection_name = "Username-Password-Authentication" | ||
user_id = "12345" | ||
username = "test" | ||
nickname = "testnick" | ||
username = "unique_username" | ||
name = "Firstname Lastname" | ||
nickname = "some.nickname" | ||
email = "[email protected]" | ||
email_verified = true | ||
password = "passpass$12$12" | ||
picture = "https://www.example.com/a-valid-picture-url.jpg" | ||
roles = [ auth0_role.admin.id ] | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,11 @@ With this resource, you can manage user identities, including resetting password | |
resource "auth0_user" "user" { | ||
connection_name = "Username-Password-Authentication" | ||
user_id = "12345" | ||
username = "test" | ||
nickname = "testnick" | ||
username = "unique_username" | ||
name = "Firstname Lastname" | ||
given_name = "Firstname" | ||
family_name = "Lastname" | ||
nickname = "some.nickname" | ||
email = "[email protected]" | ||
email_verified = true | ||
password = "passpass$12$12" | ||
|