Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to match implementation #1

Merged
merged 2 commits into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $splitTokenFactory = new Argon2SplitTokenFactory();

// Step 1. Create a new SplitToken for usage

$token = $splitTokenFactory->create();
$token = $splitTokenFactory->generate();

// The $authToken holds a \ParagonIE\HiddenString\HiddenString to prevent
// leakage of this value. You need to cast this object to an actual string
Expand All @@ -90,7 +90,7 @@ $authToken = $token->token(); // Returns a \ParagonIE\HiddenString\HiddenString
// Indicate when the token must expire. Note that you need to clear the token from storage yourself.
// Pass null (or leave this method call absent) to never expire the token (not recommended).
//
$authToken->expiresAt(new \DateTimeImmutable('+1 hour'));
$authToken->expireAt(new \DateTimeImmutable('+1 hour'));

// Now to store the token cast the SplitToken to a SplitTokenValueHolder object.
//
Expand Down
2 changes: 1 addition & 1 deletion src/SplitToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* // Create
* $splitTokenFactory = ...;
*
* $token = $splitTokenFactory->create();
* $token = $splitTokenFactory->generate();
*
* // The $authToken is to be shared with the receiver (eg. the user) only.
* // And is URI safe.
Expand Down