PublicShareController

class OCP\AppFramework\PublicShareController
Base controller for public shares
It will verify if the user is properly authenticated to the share. If not a 404
is thrown by the PublicShareMiddleware.

Use this for example for a controller that is not to be called via a webbrowser
directly. For example a PublicPreviewController. As this is not meant to be
called by a user direclty.

To show an auth page extend the AuthPublicShareController
Source:lib/public/AppFramework/PublicShareController.php#44
Parent:OCP\AppFramework\Controller

Properties

protected static property OCP\AppFramework\PublicShareController::$session
Source:lib/public/AppFramework/PublicShareController.php#47
Type:\OCP\ISession

Methods

public OCP\AppFramework\PublicShareController::__construct($appName, $request, $session)
Source:lib/public/AppFramework/PublicShareController.php#55
Since:14.0.0
public final OCP\AppFramework\PublicShareController::setToken($token)
Middleware set the token for the request
Source:lib/public/AppFramework/PublicShareController.php#68
Since:14.0.0
public final OCP\AppFramework\PublicShareController::getToken()
Get the token for this request
Source:lib/public/AppFramework/PublicShareController.php#77
Since:14.0.0
protected abstract OCP\AppFramework\PublicShareController::getPasswordHash()
Get a hash of the password for this share
To ensure access is blocked when the password to a share is changed we store
a hash of the password for this token.
Source:lib/public/AppFramework/PublicShareController.php#89
Since:14.0.0
public abstract OCP\AppFramework\PublicShareController::isValidToken()
Is the provided token a valid token
This function is already called from the middleware directly after setting the token.
Source:lib/public/AppFramework/PublicShareController.php#98
Since:14.0.0
protected abstract OCP\AppFramework\PublicShareController::isPasswordProtected()
Is a share with this token password protected
Source:lib/public/AppFramework/PublicShareController.php#105
Since:14.0.0
public OCP\AppFramework\PublicShareController::isAuthenticated()
Check if a share is authenticated or not
Source:lib/public/AppFramework/PublicShareController.php#112
Since:14.0.0
public OCP\AppFramework\PublicShareController::shareNotFound()
Function called if the share is not found.
You can use this to do some logging for example
Source:lib/public/AppFramework/PublicShareController.php#135
Since:14.0.0