Page tree

Versions Compared

Key

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

Basics

The ProfileRegistry UserRegistry Service is reachable at: {YOUR_APP_URL}/$dwo3rd-userregistry-api/profileserviceregistration)


Actions

...

Selfregistration

Actionname:myprofileregister
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/profileserviceregistration?action=myprofile
Purpose:Retrieve the UserProfile for the currently logged in User
register
Purpose:Selfregistration of a user
Method:POST
Parameter

{

firstname: "Hans",
lastname: "Muster",
email: "hans.muster@acme.com",
password: "supersecrete",

confiormation: "supersecrete"

}

Response

JSON Response with status or validation error

Mail is send to activate the user

Possible Errors

ErrorResponseType
Missing attributes:
  • firstname
  • lastname
  • email
  • password
  • conformation
JSON (validation error)
Password complexityJSON (validation error)

Invitation

Actionname:invite
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=invite
Purpose:Invitation for a user
Method:POST
Parameter

{

firstname: "Hans",
lastname: "Muster",
email: "hans.muster@acme.com",
}

Response

JSON Response with status or validation error

Mail is send to accept the invitation

Possible Errors

ErrorResponseType
Missing attributes:
  • firstname
  • lastname
  • email
JSON (validation error)
E-Mail send errorJSON (validation error)

Activate my User

Actionname:activate
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=activate&id={confirmationid}
Purpose:Activate a user after selfregistration
Method:GET
Parameterid={confirmationid} --> id of the confirmation mail
ResponseProfileOkResponse

JSON Response with status or validation error

Mail is send to accept the invitation

Possible Errors

ErrorResponseType
Profile not foundErrorResponse

Update

Actionname:updateNo User found for this confirmation idJSON (validation error)
User is already activeJSON (validation error)

Activate an invited user

Actionname:activateinviteduser
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/registration?action=activateinviteduser&id={confimationid}
Purpose:Finalize the registration of an invited user
Method:POST
Parameter

{

firstname: "Hans",
lastname: "Muster",
password: "supersecrete"
confirmation: "supersecrete"
}

Response

JSON Response with status or validation error

Mail is send to accept the invitation

Possible Errors

ErrorResponseType
Missing attributes:
  • firstname
  • lastname
  • password
  • confirmation
JSON (validation error)
Password complexityJSON (validation error)

Change Password

Actionname:changepassword
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/profileserviceregistration?action=updatechangepassword
Purpose:Update UserProfile Changes the password of the current User with supplied valuesuser
Method:POST
Payloadupdated UserProfileResponseProfileOkResponse

{

oldpasswort: "suppipw",
passoword:"newsuppipw",
confirmation:"newsuppipw"

}

ResponseJSON Response with status or validation error

Possible Errors

ErrorResponseType
Validation FailedValidationFailedResponse
Exception was thrownExceptionResponse
Failed to save updated ProfileErrorResponse

...

 Missing attributes:

  • oldpassword
  • password
  • confirmation
JSON (validation error)
Password complexityJSON (validation error)
  

Forgotten Password

Actionname:registernewpassword
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/profileserviceregistration?action=registernewpassword
Purpose:Creates Asks for a new UserProfile with the supplied valuespassword
Method:POST
Payloadnew UserProfile

{
email:"hans.muster@acme.com"

}

ResponseEmptyOkResponseJSON Response with status or validation error

Possible Errors

ErrorResponseType
Validation FailedValidationFailedResponse
Exception was thrownExceptionResponse

...

No User found with current mailadressJSON (validation error)
  

Activate new password

Actionname:activateactivatenewpassword
Example-URL{YOUR_APP_URL}/$dwo3rd-userregistry-api/profileserviceregistration?action=newpassword?action=activateactivatenewpassword&cid=50M3-R4ND0M-K3Yid={confirmationid}
Purpose:Activates an already registered UserResets the passwort to a new one
Method:GETPOST
ParameterconfirmationId

{

password: 'newpw',
confirmation: 'newpw'

}

ResponseProfileOkResponseJSON Response with status or validation error

Possible Errors

ErrorResponseType
Exception was thrownPassword complexityExceptionResponse
No request with this id 

Response

Data

The Response can contain following fields, please refer to the Responsetable below for more information about the Response contents.

FieldnameTypeContentoptional
statusStringthe status of the requestno
errorStringThe Error clearnameyes
messagesArray of String

Messages related to this request

yes
traceStringThe Stacktrace of the error as a Stringyes
profileactionObjectThe UserProfile Data; Datalayout see OverviewStringCurrent executed actionyes

 

Responsetypes Success

NameFieldsStatus
ProfileOkResponsestatus, profileok
EmptyOkResponsestatusok

ResponseTypes Error

NameFieldsStatus
ErrorResponsestatus, errorerror
ExceptionResponsestatus, error, trace, profileerror
ValidationFailedResponsestatus, error, messages, profilevalidationfailed

Guides

Children Display