asRequest method

  1. @override
ResourceDeclareRequest asRequest()
override

Implementation

@override
ResourceDeclareRequest asRequest() {
  var resource = $p.ResourceIdentifier(
    name: ruleName,
    type: $p.ResourceType.ApiSecurityDefinition,
  );

  var oidc =
      ApiOpenIdConnectionDefinition(issuer: issuer, audiences: audiences);
  var securityDefinition =
      ApiSecurityDefinitionResource(apiName: apiName, oidc: oidc);

  return $p.ResourceDeclareRequest(
      id: resource, apiSecurityDefinition: securityDefinition);
}