Nextcloud PHP API (stable18)

ICertificateManager

Manage trusted certificates for users

Tags
since
8.0.0

Table of Contents

addCertificate()  : ICertificate
getAbsoluteBundlePath()  : string
Get the full local path to the certificate bundle for this user
getCertificateBundle()  : string
Get the path to the certificate bundle for this user
listCertificates()  : \OCP\ICertificate[]
Returns all certificates trusted by the user
removeCertificate()  : mixed

Methods

addCertificate()

public addCertificate(string $certificate, string $name) : ICertificate
Parameters
$certificate : string

the certificate data

$name : string

the filename for the certificate

Tags
throws
Exception

If the certificate could not get added

since
8.0.0
  • since 8.1.0 throws exception instead of returning false
Return values
ICertificate

getAbsoluteBundlePath()

Get the full local path to the certificate bundle for this user

public getAbsoluteBundlePath([string $uid = '' ]) : string
Parameters
$uid : string = ''

(optional) user to get the certificate bundle for, use null to get the system bundle

Tags
since
9.0.0
Return values
string

getCertificateBundle()

Get the path to the certificate bundle for this user

public getCertificateBundle([string $uid = '' ]) : string
Parameters
$uid : string = ''

(optional) user to get the certificate bundle for, use null to get the system bundle (since 9.0.0)

Tags
since
8.0.0
Return values
string

listCertificates()

Returns all certificates trusted by the user

public listCertificates() : \OCP\ICertificate[]
Tags
since
8.0.0
Return values
\OCP\ICertificate[]

removeCertificate()

public removeCertificate(string $name) : mixed
Parameters
$name : string
Tags
since
8.0.0
Return values
mixed

Search results