Skip to content

Error Formatting with OpenID/OAuth 2.0 Standards #172

@izahirclemencia

Description

@izahirclemencia

Problem Description:
The current error formatting structure in the camera project diverges from the established standards of OpenID/OAuth 2.0. Although it includes fields like status, code, and message, as outlined in the provided ErrorInfo, it lacks key components such as error, error_description, and optionally error_uri, which are vital for effective error handling according to OpenID/OAuth 2.0 standards.

Here is the existing ErrorInfo structure:

ErrorInfo:
  type: object
  required:
    - status
    - code
    - message
  properties:
    status:
      type: integer
      description: HTTP response status code
    code:
      type: string
      description: Code given to this error
    message:
      type: string
      description: Detailed error description

Expected Behavior:
To ensure compliance with OpenID/OAuth 2.0 standards, the error formatting for the camera project should include the following fields:

  • error: Represents the error code or identifier.
  • error_description (optional): Provides a human-readable explanation of the error.
  • error_uri (optional): Includes a URI that offers additional information about the error.

Alternative Solution:
Alternatively, to align with OpenID/OAuth 2.0 standards, the camera project's error formatting can be updated as follows:

error:
  type: object
  required:
    - error
    - error_description
  properties:
    error:
      type: string
      description: Error code or identifier.
    error_description:
      type: string
      description: Optional human-readable description of the error.
    error_uri:
      type: string
      description: Optional URI providing additional information about the error.

Additional Context:
These suggested modifications closely adhere to the specifications outlined in the OpenID/OAuth 2.0 standard. For further clarity, please refer to the documentation provided in RFC 6749 - The OAuth 2.0 Authorization Framework, Section 4.1.2.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctioncorrection in documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions