Skip to content
Draft
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
24 changes: 16 additions & 8 deletions lib/public/Authentication/IApacheBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,44 @@
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
// use OCP namespace for all classes that are considered public.
// This means that they should be used by apps instead of the internal Nextcloud classes

namespace OCP\Authentication;

/**
* Interface IApacheBackend
* Contract for user backends that integrate authentication performed outside
* of Nextcloud.
*
* Typical implementations integrate with web-server authentication modules,
* reverse proxies, or other external authentication services. Implementations
* include the user_saml and user_oidc apps.
*
* The interface name is historical and is retained for backwards
* compatibility; it is not limited to Apache.
*
* @since 6.0.0
*/
interface IApacheBackend {
/**
* In case the user has been authenticated by a module true is returned.
* Whether the backend's external authentication mechanism considers the
* current user logged in.
*
* @return bool whether the module reports a user as currently logged in.
* @since 6.0.0
*/
public function isSessionActive(): bool;

/**
* Gets the current logout URL
* Returns the URL to use when logging out of this backend's external
* authentication flow.
*
* @return non-empty-string
* @since 12.0.3
*/
public function getLogoutUrl(): string;

/**
* Return the id of the current user
* @return string
* Returns the ID of the Nextcloud user corresponding to the externally
* authenticated user.
*
* @since 6.0.0
*/
public function getCurrentUserId(): string;
Expand Down
Loading