Accessing App from within function

How would I also access this from within a class?

class RandomAuthenticator implements AuthenticatorInterface {
public function __invoke(array $arguments) {
// $this->get(‘settings’)[‘custom’][‘minPasswordLength’] won’t work here.
return (bool)rand(0,1);
}
}

This would result an error like this:

Call to undefined method RandomAuthenticator::get() in /var/www/html/config/middleware.php on line 16

Thanks in advance!