Class RegisterController

java.lang.Object
com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController

@RestController
public class RegisterController
extends java.lang.Object
Register endpoint
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  RegisterController.RegisterCredentials  
  • Constructor Summary

    Constructors 
    Constructor Description
    RegisterController()  
  • Method Summary

    Modifier and Type Method Description
    org.springframework.http.ResponseEntity<com.google.gson.JsonObject> registerUser​(RegisterController.RegisterCredentials credentials)


    API doc:
    Description: Creates a new user given user details
    Method: POST
    Location: /users
    Body:
    {
    username: [username],
    email: [email],
    password: [password],
    agency: [an_existing_agency]
    }
    Success response: {status: "ok"}, CODE: 201
    Error response: {status: "error", message: [error_message]}

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • registerUser

      @CrossOrigin(origins="*", allowedHeaders="*") @RequestMapping(value="/users", method=POST) public org.springframework.http.ResponseEntity<com.google.gson.JsonObject> registerUser​(@RequestBody RegisterController.RegisterCredentials credentials)


      API doc:
      Description: Creates a new user given user details
      Method: POST
      Location: /users
      Body:
      {
      username: [username],
      email: [email],
      password: [password],
      agency: [an_existing_agency]
      }
      Success response: {status: "ok"}, CODE: 201
      Error response: {status: "error", message: [error_message]}
      Parameters:
      credentials - the user to create
      Returns:
      the location of the created user or error, error on invalid user