# give/4.16.8/src/Framework/FieldsAPI/Authentication.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.8. 77 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.8/code/src/Framework/FieldsAPI/Authentication.php
- Raw: https://pluginprobe.com/plugins/give/4.16.8/raw/src/Framework/FieldsAPI/Authentication.php
- Modified: 2024-07-17T20:34:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.8/code/src/Framework/FieldsAPI/Authentication.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Give\Framework\FieldsAPI;

class Authentication extends Group
{
    const TYPE = 'authentication';

    protected $required = false;
    protected $isAuthenticated = false;
    protected $loginRedirect = false;
    protected $loginRedirectUrl;
    protected $loginNotice;
    protected $loginConfirmation;
    protected $lostPasswordUrl;

    public static function make($name)
    {
        return parent::make($name)
            ->append(
                Text::make('login')
                    ->label(__('Username', 'give'))
                    ->placeholder(__('Enter your username or email', 'give'))
            )
            ->append(
                Password::make('password')
                    ->label(__('Password', 'give'))
                    ->placeholder(__('Enter your password', 'give'))
            );
    }

    public function required($value = true): self
    {
        $this->required = $value;
        return $this;
    }

    public function isAuthenticated($value = true): self
    {
        $this->isAuthenticated = $value;
        return $this;
    }

    public function loginRedirect($value = true): self
    {
        $this->loginRedirect = $value;
        return $this;
    }

    public function loginRedirectUrl($value): self
    {
        $this->loginRedirectUrl = $value;
        return $this;
    }

    public function loginNotice($value): self
    {
        $this->loginNotice = $value;
        return $this;
    }

    public function loginConfirmation($value): self
    {
        $this->loginConfirmation = $value;
        return $this;
    }


    public function lostPasswordUrl($value): self
    {
        $this->lostPasswordUrl = $value;
        return $this;
    }
}

```
