TanmoySG / wunder-identity-provider

ID Provider for Wunder Platform. Authentication & Authorization Server for all wunder products
3 stars 0 forks source link

[Standardization] Standardized Return Codes #40

Closed TanmoySG closed 2 years ago

TanmoySG commented 2 years ago

Currently the Scripts/Handlers in AuthLib return a text-based response/prompt. Using such prompts have fundamental issues -

For these reasons a standardized Return Statements Guide with Return Codes and Statements can help in global, standardized and proper usage.

[Checkpoints]

[Snippets]

Instead of using return statements like these

return "Incorrect OTP"
return "Correct OTP"

Return Codes can be used

class RETURN_CODES:
    # Sample Implementation
    self.x001 = "Incorrect OTP"
    self.x002 = "Correct OTP"

return RETURN_CODES().x001

[Additional Information]

Table with configurations for different codes can be added in the README.