Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
CredentialsManager Class Reference

The CredentialsManager class stores credentials for users. More...

#include <credentialmanager.h>

Inheritance diagram for CredentialsManager:
FallbackCredentialsManager

Signals

void tokenRetrieved (const QString &server, const QString &user, const QString &token) const
 
void serversListed (const QStringList &servers) const
 
void usersListed (const QString &server, const QStringList &users) const
 

Public Member Functions

virtual void store (const QString &server, const QString &user, const QString &token)
 Stores a token.
 
virtual void get (const QString &server, const QString &user) const
 Retrieves a stored token. Emits tokenRetrieved when the token is retrieved.
 
virtual void remove (const QString &server, const QString &user)
 removes a token
 
virtual void listServers () const
 Gives the list of servers that have a user stored with a token.
 
virtual void listUsers (const QString &server)
 List the users with a token on a server.
 
virtual bool isSecure () const
 

Static Public Member Functions

static CredentialsManagernewInstance (QObject *parent=nullptr)
 Retrieves an implementation which can store this token.
 

Protected Member Functions

 CredentialsManager (QObject *parent=nullptr)
 

Detailed Description

The CredentialsManager class stores credentials for users.

You can get an instance using instance(), which may depend on the platform being used. Since the implementation may be asynchronous, the methods won't return anything, they emit a corresponding signal instead.

Constructor & Destructor Documentation

◆ CredentialsManager()

CredentialsManager::CredentialsManager ( QObject * parent = nullptr)
inlineexplicitprotected

Member Function Documentation

◆ get()

virtual void CredentialsManager::get ( const QString & server,
const QString & user ) const
inlinevirtual

Retrieves a stored token. Emits tokenRetrieved when the token is retrieved.

Parameters
serverThe serverId to retrieve the token from.
userThe user to retrieve the token for

Reimplemented in FallbackCredentialsManager.

◆ isSecure()

virtual bool CredentialsManager::isSecure ( ) const
inlinevirtual
Returns
if the implementation of this interface stores the token in a secure place.

Reimplemented in FallbackCredentialsManager.

◆ listServers()

virtual void CredentialsManager::listServers ( ) const
inlinevirtual

Gives the list of servers that have a user stored with a token.

Reimplemented in FallbackCredentialsManager.

◆ listUsers()

virtual void CredentialsManager::listUsers ( const QString & server)
inlinevirtual

List the users with a token on a server.

Parameters
server

Reimplemented in FallbackCredentialsManager.

◆ newInstance()

CredentialsManager * CredentialsManager::newInstance ( QObject * parent = nullptr)
static

Retrieves an implementation which can store this token.

Parameters
Theparent to set the implementations QObject parent to

This method is always guaranteed to return an instance.

Returns
An implementation of this interface (may vary acrros platform).

◆ remove()

virtual void CredentialsManager::remove ( const QString & server,
const QString & user )
inlinevirtual

removes a token

Parameters
server
user

Reimplemented in FallbackCredentialsManager.

◆ serversListed

void CredentialsManager::serversListed ( const QStringList & servers) const
signal

◆ store()

virtual void CredentialsManager::store ( const QString & server,
const QString & user,
const QString & token )
inlinevirtual

Stores a token.

Parameters
serverThe server to store the token for
userThe user to store the token for.
tokenThe token to store.

Reimplemented in FallbackCredentialsManager.

◆ tokenRetrieved

void CredentialsManager::tokenRetrieved ( const QString & server,
const QString & user,
const QString & token ) const
signal

◆ usersListed

void CredentialsManager::usersListed ( const QString & server,
const QStringList & users ) const
signal

The documentation for this class was generated from the following files: