Skip to main content

Crate nextcloud_auth

Crate nextcloud_auth 

Source
Expand description

Credential types for the Nextcloud SDK.

Every provider here implements sdk_core::AuthProvider and only mutates request headers, so callers stay generic over the credential format:

  • BasicAuth โ€” user name plus app password, Authorization: Basic.
  • BearerAuth โ€” OAuth2 access token, Authorization: Bearer.
  • Anonymous โ€” no credentials, plus the OCS-APIRequest marker OCS endpoints require.

Secrets are held in SecretString, whose Debug output is redacted and which deliberately has neither a Display nor a Serialize impl.

Structsยง

Anonymous
Applies no credentials at all.
AppPassword
A Nextcloud user name paired with an app password.
BasicAuth
Applies AppPassword credentials as an Authorization: Basic header.
BearerAuth
Applies an OAuth2 access token as an Authorization: Bearer header.
BearerToken
An OAuth2 access token issued by a Nextcloud instance.
SecretString
A string whose contents never appear in logs or Debug output.