-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom Authentication Mechanisms for WebDAV and APIs (#26742)
* Add plugin mechanism for authentication * Update PHPDoc in IAuthModule * Update PHPDoc for auth function * Add getUserPassword function in IAuthModule * Add loading of additional AuthBackends for webdav interface * Add type check for IAuthModule
- Loading branch information
1 parent
7ec5c15
commit d35a58d
Showing
4 changed files
with
123 additions
and
0 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
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
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
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,36 @@ | ||
<?php | ||
|
||
namespace OCP\Authentication; | ||
|
||
use OCP\IRequest; | ||
use OCP\IUser; | ||
|
||
/** | ||
* Interface IAuthModule | ||
* | ||
* @package OCP\Authentication | ||
* @since 10.0.0 | ||
*/ | ||
interface IAuthModule { | ||
|
||
/** | ||
* Authenticates a request. | ||
* | ||
* @param IRequest $request The request. | ||
* | ||
* @return null|IUser The user if the request is authenticated, null otherwise. | ||
* @since 10.0.0 | ||
*/ | ||
public function auth(IRequest $request); | ||
|
||
/** | ||
* Returns the user's password. | ||
* | ||
* @param IRequest $request The request. | ||
* | ||
* @return String The user's password. | ||
* @since 10.0.0 | ||
*/ | ||
public function getUserPassword(IRequest $request); | ||
|
||
} |