\OCP\Files\External\AuthAuthMechanism

Authentication mechanism

An authentication mechanism can have services injected during construction, such as \OCP\IDB for database operations. This allows an authentication mechanism to perform advanced operations based on provided information.

An authenication scheme defines the parameter interface, common to the storage implementation, the backend and the authentication mechanism. A storage implementation expects parameters according to the authentication scheme, which are provided from the authentication mechanism.

This class uses the following traits:

  • VisibilityTrait Restrict usage to admin-only/none
  • FrontendDefinitionTrait Specify configuration parameters and other definitions
  • StorageModifierTrait Object can affect storage mounting

Summary

Methods
Properties
Constants
getScheme()
setScheme()
jsonSerialize()
validateStorage()
No public properties found
SCHEME_NULL
SCHEME_BUILTIN
SCHEME_PASSWORD
SCHEME_OAUTH1
SCHEME_OAUTH2
SCHEME_PUBLICKEY
SCHEME_OPENSTACK
No protected methods found
$scheme
N/A
No private methods found
No private properties found
N/A

Constants

SCHEME_NULL

SCHEME_NULL

Standard authentication schemes

SCHEME_BUILTIN

SCHEME_BUILTIN

SCHEME_PASSWORD

SCHEME_PASSWORD

SCHEME_OAUTH1

SCHEME_OAUTH1

SCHEME_OAUTH2

SCHEME_OAUTH2

SCHEME_PUBLICKEY

SCHEME_PUBLICKEY

SCHEME_OPENSTACK

SCHEME_OPENSTACK

Properties

$scheme

$scheme : string

Type

string

Methods

getScheme()

getScheme() : string

Get the authentication scheme implemented See self::SCHEME_* constants

Returns

string

setScheme()

setScheme(string  $scheme) : self

Parameters

string $scheme

Returns

self

jsonSerialize()

jsonSerialize() : array

Serialize into JSON for client-side JS

Returns

array

validateStorage()

validateStorage(\OCP\Files\External\IStorageConfig  $storage) : boolean

Check if parameters are satisfied in a IStorageConfig

Parameters

\OCP\Files\External\IStorageConfig $storage

Returns

boolean