• This function can be used to determine if a end user is allowed to consume a specific operation. If the authorization fails, an AxGuard error is thrown.

    Parameters

    • options: GqlAuthorizationOptions

      a GqlAuthorizationOptions object. The options and endUserAuthorizationConfig properties are mandatory.

    • ensureOnlyAuthentication: boolean

      a boolean value indicating if authorization validations should be performed or checking for authentication is sufficient.

    • subject: undefined | GenericAuthenticatedSubject

      A GenericAuthenticatedSubject

    • authErrorInfo: undefined | MosaicErrorInfo

      AxGuardErrorInfo

    Returns void

    Throws

    an AxGuardError if the authorization fails.

Generated using TypeDoc