swagger: "2.0"
host: apibeta.uscann.net
basePath: /apiv1
info:
  contact: {}
  description: Api Documentation
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  termsOfService: urn:tos
  title: Api Documentation
  version: "1.0"
  x-apisguru-categories:
    - security
  x-origin:
    - format: swagger
      url: https://apibeta.uscann.net/apiv1/v2/api-docs?group=authentication-api
      version: "2.0"
  x-providerName: uscann.net
tags:
  - description: the authentication API
    name: authentication-api-controller
paths:
  /authentication/forgotPassword:
    post:
      consumes:
        - application/json
      deprecated: false
      operationId: forgotPassword
      parameters:
        - default: application/json
          in: header
          name: Content-Type
          required: true
          type: string
        - description: The User email used to send email
          in: body
          name: forgotPassword
          required: true
          schema:
            $ref: "#/definitions/EmailModel"
      produces:
        - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ResponseStatus"
        "201":
          description: Created
        "400":
          description: Unexpected error
          schema:
            $ref: "#/definitions/Problem"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      summary: forgotPassword
      tags:
        - authentication-api-controller
  /authentication/register:
    post:
      consumes:
        - application/json
      deprecated: false
      operationId: register
      parameters:
        - default: application/json
          in: header
          name: Content-Type
          required: true
          type: string
        - description: The RegistrationForm definition is used to register the customer
          in: body
          name: register
          required: true
          schema:
            $ref: "#/definitions/RegistrationModel"
      produces:
        - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ResponseStatus"
        "201":
          description: Created
        "400":
          description: Unexpected error
          schema:
            $ref: "#/definitions/Problem"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      summary: register
      tags:
        - authentication-api-controller
  /authentication/setForgotPassword:
    post:
      consumes:
        - application/json
      deprecated: false
      operationId: setForgotPassword
      parameters:
        - default: application/json
          in: header
          name: Content-Type
          required: true
          type: string
        - description: The ForgotMailToken definition used to returns status of password reset
          in: body
          name: token
          required: true
          schema:
            $ref: "#/definitions/ForgotMailToken"
      produces:
        - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ResponseStatus"
        "201":
          description: Created
        "400":
          description: Unexpected error
          schema:
            $ref: "#/definitions/Problem"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      summary: validates the mail token and set new password
      tags:
        - authentication-api-controller
  /authentication/token:
    post:
      consumes:
        - application/json
      deprecated: false
      operationId: authenticateUser
      parameters:
        - default: application/json
          in: header
          name: Content-Type
          required: true
          type: string
        - description: The LoginUser definition used to returns the token for authentication
          in: body
          name: loginUser
          required: true
          schema:
            $ref: "#/definitions/LoginUser"
      produces:
        - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/JwtResponse"
        "201":
          description: Created
        "400":
          description: Unexpected error
          schema:
            $ref: "#/definitions/Problem"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      summary: authenticate the user and returns the token
      tags:
        - authentication-api-controller
  /authentication/validateMailToken:
    post:
      consumes:
        - application/json
      deprecated: false
      operationId: validateMailToken
      parameters:
        - default: application/json
          in: header
          name: Content-Type
          required: true
          type: string
        - description: The MailToken definition used to returns status of validation
          in: body
          name: token
          required: true
          schema:
            $ref: "#/definitions/MailToken"
      produces:
        - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ResponseStatus"
        "201":
          description: Created
        "400":
          description: Unexpected error
          schema:
            $ref: "#/definitions/Problem"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      summary: validates the mail token
      tags:
        - authentication-api-controller
definitions:
  EmailModel:
    properties:
      email:
        description: The email of user
        type: string
    required:
      - email
    title: EmailModel
    type: object
  ForgotMailToken:
    properties:
      activity:
        description: The user activity
        type: string
      password:
        description: The user password
        type: string
      token:
        description: The token
        type: string
    required:
      - activity
      - token
    title: ForgotMailToken
    type: object
  JwtResponse:
    properties:
      activities:
        description: The activities of the User
        type: string
      customerId:
        description: The ID of the Customer
        format: int32
        type: integer
      email:
        description: The Role of the User
        type: string
      fullName:
        description: The Role of the User
        type: string
      partnerId:
        description: The ID of the Partner
        format: int32
        type: integer
      role:
        description: The Role of the User
        type: string
      settings:
        description: The settings of the User
        type: string
      token:
        description: The value of token
        type: string
      type:
        description: The type of token
        type: string
      userId:
        description: The ID of the User
        format: int32
        type: integer
      username:
        description: The username of the User
        type: string
    required:
      - token
      - type
    title: JwtResponse
    type: object
  LoginUser:
    properties:
      password:
        description: The user password
        type: string
      username:
        description: The name of user
        type: string
    required:
      - password
      - username
    title: LoginUser
    type: object
  MailToken:
    properties:
      activity:
        description: The user activity
        type: string
      token:
        description: The token
        type: string
    required:
      - activity
      - token
    title: MailToken
    type: object
  Problem:
    properties:
      code:
        type: string
      message:
        type: string
    required:
      - code
      - message
    title: Problem
    type: object
  RegistrationModel:
    properties:
      city:
        description: The city of address
        type: string
      companyDescription:
        description: The company Description
        type: string
      companyName:
        description: The company name of customer
        type: string
      country:
        description: The country of address
        type: string
      date1:
        description: The buffer date 1
        type: string
      date2:
        description: The buffer date 2
        type: string
      date3:
        description: The buffer date 3
        type: string
      email:
        description: The email of customer
        type: string
      firstName:
        description: The first name of customer
        type: string
      lastName:
        description: The last name of customer
        type: string
      number1:
        description: The buffer number 1
        format: int32
        type: integer
      number2:
        description: The buffer number 2
        format: int32
        type: integer
      number3:
        description: The buffer number 3
        format: int32
        type: integer
      password:
        description: The password of customer
        type: string
      phone:
        description: The mobile number
        type: string
      state:
        description: The state of customer
        type: string
      storage:
        description: The facial recognition type of customer
        type: string
      streetAddress:
        description: The street of address
        type: string
      string1:
        description: The buffer string 1
        type: string
      string2:
        description: The buffer string 2
        type: string
      string3:
        description: The buffer string 3
        type: string
      username:
        description: The username of customer
        type: string
      zip:
        description: The zip code of address
        type: string
    required:
      - companyName
      - email
      - password
      - username
    title: RegistrationModel
    type: object
  ResponseEntity:
    properties:
      body:
        type: object
      statusCode:
        enum:
          - 100 CONTINUE
          - 101 SWITCHING_PROTOCOLS
          - 102 PROCESSING
          - 103 CHECKPOINT
          - 200 OK
          - 201 CREATED
          - 202 ACCEPTED
          - 203 NON_AUTHORITATIVE_INFORMATION
          - 204 NO_CONTENT
          - 205 RESET_CONTENT
          - 206 PARTIAL_CONTENT
          - 207 MULTI_STATUS
          - 208 ALREADY_REPORTED
          - 226 IM_USED
          - 300 MULTIPLE_CHOICES
          - 301 MOVED_PERMANENTLY
          - 302 FOUND
          - 302 MOVED_TEMPORARILY
          - 303 SEE_OTHER
          - 304 NOT_MODIFIED
          - 305 USE_PROXY
          - 307 TEMPORARY_REDIRECT
          - 308 PERMANENT_REDIRECT
          - 400 BAD_REQUEST
          - 401 UNAUTHORIZED
          - 402 PAYMENT_REQUIRED
          - 403 FORBIDDEN
          - 404 NOT_FOUND
          - 405 METHOD_NOT_ALLOWED
          - 406 NOT_ACCEPTABLE
          - 407 PROXY_AUTHENTICATION_REQUIRED
          - 408 REQUEST_TIMEOUT
          - 409 CONFLICT
          - 410 GONE
          - 411 LENGTH_REQUIRED
          - 412 PRECONDITION_FAILED
          - 413 PAYLOAD_TOO_LARGE
          - 413 REQUEST_ENTITY_TOO_LARGE
          - 414 URI_TOO_LONG
          - 414 REQUEST_URI_TOO_LONG
          - 415 UNSUPPORTED_MEDIA_TYPE
          - 416 REQUESTED_RANGE_NOT_SATISFIABLE
          - 417 EXPECTATION_FAILED
          - 418 I_AM_A_TEAPOT
          - 419 INSUFFICIENT_SPACE_ON_RESOURCE
          - 420 METHOD_FAILURE
          - 421 DESTINATION_LOCKED
          - 422 UNPROCESSABLE_ENTITY
          - 423 LOCKED
          - 424 FAILED_DEPENDENCY
          - 425 TOO_EARLY
          - 426 UPGRADE_REQUIRED
          - 428 PRECONDITION_REQUIRED
          - 429 TOO_MANY_REQUESTS
          - 431 REQUEST_HEADER_FIELDS_TOO_LARGE
          - 451 UNAVAILABLE_FOR_LEGAL_REASONS
          - 500 INTERNAL_SERVER_ERROR
          - 501 NOT_IMPLEMENTED
          - 502 BAD_GATEWAY
          - 503 SERVICE_UNAVAILABLE
          - 504 GATEWAY_TIMEOUT
          - 505 HTTP_VERSION_NOT_SUPPORTED
          - 506 VARIANT_ALSO_NEGOTIATES
          - 507 INSUFFICIENT_STORAGE
          - 508 LOOP_DETECTED
          - 509 BANDWIDTH_LIMIT_EXCEEDED
          - 510 NOT_EXTENDED
          - 511 NETWORK_AUTHENTICATION_REQUIRED
        type: string
      statusCodeValue:
        format: int32
        type: integer
    title: ResponseEntity
    type: object
  ResponseStatus:
    properties:
      code:
        description: Indicates whether connection was established or not
        enum:
          - success
          - failure
        type: string
      message:
        description: The message that provides more detail relating to the status code
        type: string
    required:
      - code
      - message
    title: ResponseStatus
    type: object
