Functions - auth

extractUsernameAndPassword

Extracts the username and password from the credential values.

prepareAuthError

Log and prepare error as a AuthError.

extractUsernameAndPassword

(string credential)

returns [string, string] | AuthError

Extracts the username and password from the credential values.

Parameters

  • credential string
  • The credential values.

  • Return Type

    ([string, string] | AuthError)
  • A string tuple with the extracted username and password or AuthError occurred while extracting credentials

prepareAuthError

(string message, error? err)

returns AuthError

Log and prepare error as a AuthError.

Parameters

  • message string
  • Error message

  • err error? - ()
  • error instance

  • Return Type

    (AuthError)
  • Prepared AuthError instance