From b53d5fc1da57986f8fdbbc07312d85936b584d48 Mon Sep 17 00:00:00 2001
From: Barnaby Walters Single User Password Authentication Callback
The sign-in form can be customised by making your own template and passing the path to the constructor.
Minimal usage:
-// One-off during app configuration:
+// One-off during app configuration:
YOUR_HASHED_PASSWORD = password_hash('my super strong password', PASSWORD_DEFAULT);
// In your app:
@@ -202,7 +202,7 @@ $server = new IndieAuth\Server([
@@ -242,7 +242,7 @@ $server = new IndieAuth\Server([
@@ -272,7 +272,7 @@ $server = new IndieAuth\Server([
@@ -302,7 +302,7 @@ $server = new IndieAuth\Server([
@@ -332,7 +332,7 @@ $server = new IndieAuth\Server([
@@ -366,7 +366,7 @@ $server = new IndieAuth\Server([
Constructor
@@ -439,7 +439,7 @@ $server = new IndieAuth\Server([
diff --git a/src/Callback/SingleUserPasswordAuthenticationCallback.php b/src/Callback/SingleUserPasswordAuthenticationCallback.php
index abc4822..b2df3b1 100644
--- a/src/Callback/SingleUserPasswordAuthenticationCallback.php
+++ b/src/Callback/SingleUserPasswordAuthenticationCallback.php
@@ -24,19 +24,21 @@ use function Taproot\IndieAuth\renderTemplate;
*
* Minimal usage:
*
- * // One-off during app configuration:
- * YOUR_HASHED_PASSWORD = password_hash('my super strong password', PASSWORD_DEFAULT);
- *
- * // In your app:
- * use Taproot\IndieAuth;
- * $server = new IndieAuth\Server([
- * …
- * 'authenticationHandler' => new IndieAuth\Callback\SingleUserPasswordAuthenticationCallback(
- * ['me' => 'https://me.example.com/'],
- * YOUR_HASHED_PASSWORD
- * )
- * …
- * ]);
+ * ```php
+ * // One-off during app configuration:
+ * YOUR_HASHED_PASSWORD = password_hash('my super strong password', PASSWORD_DEFAULT);
+ *
+ * // In your app:
+ * use Taproot\IndieAuth;
+ * $server = new IndieAuth\Server([
+ * …
+ * 'authenticationHandler' => new IndieAuth\Callback\SingleUserPasswordAuthenticationCallback(
+ * ['me' => 'https://me.example.com/'],
+ * YOUR_HASHED_PASSWORD
+ * )
+ * …
+ * ]);
+ * ```
*
* See documentation for `__construct()` for information about customising behaviour.
*/