Object -
auth
:
InboundBasicAuthProvider
Represents the configuration file based inbound Basic Auth provider, which is an implementation of the
auth:InboundAuthProvider
interface.
auth:InboundBasicAuthProvider inboundBasicAuthProvider = new;
A user is denoted by a section in the Ballerina configuration file. The password and the scopes assigned to the user
are denoted as keys under the relevant user section as shown below.
[b7a.users.<username>]
password="<password>"
scopes="<comma_separated_scopes>"
Constructor
__init
(BasicAuthConfig? basicAuthConfig)
- basicAuthConfig BasicAuthConfig? ()
-
Basic Auth provider configurations
Methods
Attempts to authenticate the base64-encoded
username:password
credentials.
Fields
- basicAuthConfig BasicAuthConfig
-
The Basic Auth provider configurations
Attempts to authenticate the base64-encoded username:password
credentials.
boolean|auth:Error authenticationResult = inboundBasicAuthProvider.authenticate("<credential>");
Parameters
- credential string
-
Base64-encoded
username:password
value
-
Return Type
(boolean | Error) true
if the authentication is successful,false
otherwise, or else anauth:Error
occurred while authenticating the credentials