/// <summary> /// Initializes a new <see cref="AuthenticationDefinitionBuilder"/> /// </summary> /// <param name="authenticationDefinition">The <see cref="Models.AuthenticationDefinition"/> to configure</param> protected AuthenticationDefinitionBuilder(AuthenticationDefinition authenticationDefinition) { if (authenticationDefinition == null) { throw new ArgumentNullException(nameof(authenticationDefinition)); } this.AuthenticationDefinition = authenticationDefinition; }
/// <inheritdoc/> public virtual IFunctionBuilder UseAuthentication(AuthenticationDefinition authenticationDefinition) { if (authenticationDefinition == null) { throw new ArgumentNullException(nameof(authenticationDefinition)); } this.Function.AuthRef = authenticationDefinition.Name; this.Workflow.AddAuthentication(authenticationDefinition); return(this); }
/// <inheritdoc/> public virtual IWorkflowBuilder AddAuthentication(AuthenticationDefinition authenticationDefinition) { if (authenticationDefinition == null) { throw new ArgumentNullException(nameof(authenticationDefinition)); } if (this.Workflow.Auth == null) { this.Workflow.Auth = new(); } this.Workflow.Auth.Add(authenticationDefinition); return(this); }