ballerina.auth package

public struct HttpAuthnHandler

Representation of Authentication handler for HTTP traffic. Any authention interceptor for basic authentication should be struct-wise similar to HttpAuthnInterceptor

  • < HttpAuthnHandler > canHandle ( InRequest req ) ( boolean )

    Intercepts a HTTP request for authentication

    Parameter Name Data Type Description
    req InRequest InRequest object

    Return Variable Data Type Description
    boolean boolean: true if authentication is a success, else false
  • < HttpAuthnHandler > handle ( InRequest req ) ( boolean )

    Checks if the provided HTTP request can be authenticated with basic auth

    Parameter Name Data Type Description
    req InRequest InRequest object

    Return Variable Data Type Description
    boolean boolean: true if its possible authenticate with basic auth, else false