PHP code example of piotzkhider / firebase-authentication-module
1. Go to this page and download the library: Download piotzkhider/firebase-authentication-module library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
piotzkhider / firebase-authentication-module example snippets
use Piotzkhider\FirebaseAuthenticationModule\FirebaseAuthenticationModule;
class AppModule extends AbstractAppModule
{
/**
* {@inheritdoc}
*/
protected function configure()
{
$appDir = $this->appMeta->appDir;
class Tasks extends ResourceObject
{
/**
* @Authenticate
*/
public function onGet(): ResourceObject
{
class Tasks extends ResourceObject
{
/**
* @Authenticate(user="user")
*/
public function onGet(UserRecord $user = null): ResourceObject
{