Functions

extractUsernameAndPassword
I

Extracts the username and the password from the Base64-encoded username:password value.

extractUsernameAndPassword

function extractUsernameAndPassword(string credential) returns [string, string] | Error
Isolated Function

Extracts the username and the password from the Base64-encoded username:password value.

1[string, string] [username, password] = check auth:extractUsernameAndPassword("<credential>");

Parameters

  • credential string
  • The Base64-encoded username:password value

Return Type

([string, string] | Error)

A string tuple with the extracted username and password or else an auth:Error if an error occurred