-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #914 from pantheon-systems/update/documentation
Updated documentation and doc-making script
- Loading branch information
Showing
11 changed files
with
571 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Terminus\Helpers\AuthHelper | ||
|
||
### __construct | ||
##### Description: | ||
Object constructor | ||
|
||
##### Parameters: | ||
[array] $options Options and dependencies for this helper | ||
|
||
##### Return: | ||
[AuthHelper] | ||
|
||
--- | ||
|
||
### ensureLogin | ||
##### Description: | ||
Ensures the user is logged in or errs. | ||
|
||
##### Return: | ||
[bool] Always true | ||
|
||
##### Throws: | ||
TerminusException | ||
|
||
--- | ||
|
||
### getMachineTokenCreationUrl | ||
##### Description: | ||
Generates the URL string for where to create a machine token | ||
|
||
##### Return: | ||
[string] | ||
|
||
--- | ||
|
||
### getOnlySavedToken | ||
##### Description: | ||
Gets the only saved token or returns false | ||
|
||
##### Return: | ||
[bool|string] | ||
|
||
--- | ||
|
||
### loggedIn | ||
##### Description: | ||
Checks to see if the current user is logged in | ||
|
||
##### Return: | ||
[bool] True if the user is logged in | ||
|
||
--- | ||
|
||
### logInViaMachineToken | ||
##### Description: | ||
Execute the login based on a machine token | ||
|
||
##### Parameters: | ||
[string[]] $args Elements as follow: | ||
-string token Machine token to initiate login with | ||
-string email Email address to locate token with | ||
|
||
##### Return: | ||
[bool] True if login succeeded | ||
|
||
##### Throws: | ||
TerminusException | ||
|
||
--- | ||
|
||
### logInViaUsernameAndPassword | ||
##### Description: | ||
Execute the login via email/password | ||
|
||
##### Parameters: | ||
[string] $email Email address associated with a Pantheon account | ||
[string] $password Password for the account | ||
|
||
##### Return: | ||
[bool] True if login succeeded | ||
|
||
##### Throws: | ||
TerminusException | ||
|
||
--- | ||
|
||
### tokenExistsForEmail | ||
##### Description: | ||
Checks to see whether the email has been set with a machine token | ||
|
||
##### Parameters: | ||
[string] $email Email address to check for | ||
|
||
##### Return: | ||
[bool] | ||
|
||
--- | ||
|
Oops, something went wrong.