Create AuthController.
2108
public function createAuthController()
    {
        $authController = $this->directory.'/Controllers/AuthController.php';
        $contents = $this->getStub('AuthController');

        $this->laravel['files']->put(
            $authController,
            str_replace('DummyNamespace', Admin::controllerNamespace(), $contents)
        );
        $this->line('<info>AuthController file was created:</info> '.str_replace(base_path(), '', $authController));
    }
465276
private static function auth()
    {
        $files = ['Auth'];
        $folder = static::$root.'Authentication'.'/';

        self::call($files, $folder);

        $files = ['AuthenticationModelNotFoundException'];
        $folder = static::$root.'Authentication/Exceptions'.'/';

        self::call($files, $folder);
    }
657681
def auth_view(name, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('auth:group:view', **{
        'storage': ctx.repo.create_secure_service('storage'),
        'name': name,
    })
1199915
def make_controller(cls, config, session, left_menu_items=None):
        """"""
        m = config.model
        Controller = config.defaultCrudRestController

        class ModelController(Controller):
            model        = m
            table        = config.table_type(session)
            table_filler = config.table_filler_type(session)
            new_form     = config.new_form_type(session)
            new_filler   = config.new_filler_type(session)
            edit_form    = config.edit_form_type(session)
            edit_filler  = config.edit_filler_type(session)
            allow_only   = config.allow_only

            if hasattr(config.layout, 'crud_resources'):
                resources = config.layout.crud_resources

            def _before(self, *args, **kw):
                super(self.__class__, self)._before(*args, **kw)

                tmpl_context.make_pager_args = make_pager_args

                if request.response_type not in ('application/json',):
                    default_renderer = AdminController._get_default_renderer()
                    for action in ('get_all', 'new', 'edit'):
                        for template in config.layout.crud_templates.get(action, []):
                            if template.startswith(default_renderer):
                                override_template(getattr(self, action), template)

        return ModelController(session, left_menu_items)
991759
public function auth()
    {
        // Ensure AUTH has not already been initiated.
        parent::auth();

        $this->_send('AUTH PLAIN');
        $this->_expect(334);
        $this->_send(base64_encode("\0" . $this->_username . "\0" . $this->_password));
        $this->_expect(235);
        $this->_auth = true;
    }
1304868
protected function createController()
    {
        Artisan::call('make:controller', [
            'name' => $controller = $this->controllerWithoutMethod($this->action())
        ]);
        $this->addMethodToController($controller, $this->controllerMethod($this->action()));
        $this->info('Controller ' . $controller .' created.');
        $this->createView($this->argument('link'));
    }
176882
protected function registerAuth()
    {
        $this->app->singleton('api.auth', function ($app) {
            return new Auth($app['Dingo\Api\Routing\Router'], $app, $this->config('auth'));
        });
    }
1275888
def auth_create(name, token, force, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('auth:group:create', **{
        'storage': ctx.repo.create_secure_service('storage'),
        'name': name,
        'token': token,
        'force': force,
    })
346426
private function authFunctionality()
    {
        if($this->getAttribute('activate')) {
            File::deleteDirectory($this->destinationDir.'/controllers/Auth');
            File::deleteDirectory($this->destinationDir.'/views/auth');
        }
        return $this;
    }
1247640
function createOnAuthStateChangedChannel() {
  const auth = this.app.auth();
  const channel = eventChannel(emit =>
    auth.onAuthStateChanged(user => emit({ user })),
  );
  return channel;
}
690147
public function auth() {

        try {
            $this->authResponse = $this->authAdapterInterface->authenticate();
        } catch (\Exception $ex) {
            throw $ex;
        }

        $message = $this->authResponse->getMessage();

        if ($message->getCode() == AuthResponse::AUTHRESPONSE_SUCCESS) {
            $this->session->set($message->getKeysession(), $message->getAttrsession());
        }

        return;
    }
48896
function setup() {
        if (
            !isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != $this->username ||
            !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_PW'] != $this->password
        ) {
            throw new Tonic\UnauthorizedException;
        }
    }
472272
public function setupAuthentication() {
		if (!in_array('Auth', $this->components()->loaded())) {
			$this->components()->load('Auth');
		}

		$this->components()->Auth->setConfig('authenticate', [
			'Form' => [
				'userModel' => 'Users',
				'fields' => [
					'username' => 'email',
					'password' => 'password'
				],
				'scope' => [
					'Users.email_verified' => 1
				]
			]
		]);
	}
989137
def make_auth_headers(self, content_type):
        """"""
        headers = self.make_headers(content_type)
        headers['Authorization'] = 'Basic {}'.format(self.get_auth_string())
        return headers
381576
def init_app(self, app):
        """"""
        app.add_url_rule(self.request_token_url, view_func=self.request_token,
                         methods=[u'POST'])
        app.add_url_rule(self.access_token_url, view_func=self.access_token,
                         methods=[u'POST'])
        app.add_url_rule(self.register_url, view_func=self.register,
                         methods=[u'GET', u'POST'])
        app.add_url_rule(self.authorize_url, view_func=self.authorize,
                         methods=[u'GET', u'POST'])
670618
def create_uaa(self, admin_secret, **kwargs):
        
        uaa = predix.admin.uaa.UserAccountAuthentication(**kwargs)
        if not uaa.exists():
            uaa.create(admin_secret, **kwargs)

        uaa.add_to_manifest(self)
        return uaa
549928
public function createHomeController()
    {
        $homeController = $this->directory.'/Controllers/HomeController.php';
        $contents = $this->getStub('HomeController');

        $this->laravel['files']->put(
            $homeController,
            str_replace('DummyNamespace', config('lia.route.namespace'), $contents)
        );
        $this->line('<info>HomeController file was created:</info> '.str_replace(base_path(), '', $homeController));
    }