Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleResult
collapsetrue
{ "statusFact" : { "success" : true }}

Check User's Attribute Availability

Current Implementation

This operation can be used to check whether a specific value for a specific attribute of a User is already taken by any other user.

Info
This operation can be used with a temporal token.


The supported attributes are:

  • tagId
  • email
  • username
  • pin

Parameters

Base URL: /userAttributeAvailable/{attribute}
Parameters:

NameTypeMandatoryDescription
{attribute}ENUMYesPossible values: ['tagId', 'email', 'username', 'pin'].
The User's attribute we want to check. 
tokenStringYesSecurity Token obtained before.
userIdStringOnly if 'token' is not a temporal tokenThe id of the logged in user.
temporalSessionBooleanNo

 DEFAULT: 'false'.

Indicates whether the provided token is temporal or not. 

valueStringYesThe value that we want to check.

 

API Sample

Available attribute (email)

http://localhost:8080/PresentationServices/userAttributeAvailable/email?token=d56c8e42-395e-4ba1-9bbb-73e5ed403f51&userId=poda&value=available-email@unc.org

Code Block
titleResult
collapsetrue
{
"data":{
"available":true
},
"statusFact":{
"success":true
}
}


Non Available Attribute (username)

http://localhost:8080/PresentationServices/userAttributeAvailable/username?token=d56c8e42-395e-4ba1-9bbb-73e5ed403f51&userId=poda&value=10

Code Block
titleResult
collapsetrue
{
"data":{
"available":false,
"takenBy":"podb"
},
"statusFact":{
"success":true
}
}