Skip to contents

User profile secret manager for SAIL DB authentication

Details

Profile secret manager for SAIL DB authentication; exported to allow for use in your personal projects and/or to better manage your own secrets

Public fields

keychain

(character|NA)
A private reference to the keychain name

connected

(character|NA)
A read-only field describing the name of the keychain

Active bindings

keychain

(character|NA)
A private reference to the keychain name

connected

(character|NA)
A read-only field describing the name of the keychain

system.user

(character|NA)
A read-only helper field to derive the client's system username

Methods


Method new()

Initialise a user profile instance

Usage

Profile$new(keychain.name = NA)

Arguments

keychain.name

(character|NA)
A keychain name; defaults to SAILDB.DEF$KEYCHAIN if no name is given

Returns

A new user profile instance


Method has.secrets()

Method to check whether a secret exists for the given username and database

Usage

Profile$has.secrets(username = NA, database = SAILDB.DEF$DATABASE)

Arguments

username

(character|NA)
Optional username that relates to these secrets

database

(character|NA)
The name of the database that these secrets relate to; defaults to SAILDB.DEF$DATABASE if no name is given

Returns

A logical describing whether any secrets exist


Method get.secrets()

Method to collect the secrets associated with the given username and database

Usage

Profile$get.secrets(username = NA, database = SAILDB.DEF$DATABASE)

Arguments

username

(character|NA)
A username that relates to these secrets

database

(character|NA)
The name of the database that these secrets relate to; defaults to SAILDB.DEF$DATABASE if no name is given

Returns

The secrets associated with this username & database if the key exists


Method is.secret()

Compare a known secret to the value stored in the keychain

Usage

Profile$is.secret(username = NA, password = NA, database = SAILDB.DEF$DATABASE)

Arguments

username

(character|NA)
Optional username that relates to these secrets

password

(character|NA)
The secret you would like to compare to any stored in the keychain

database

(character|NA)
The name of the database that these secrets relate to; defaults to SAILDB.DEF$DATABASE if no name is given

Returns

A logical describing the equivalence between the secrets


Method set.secrets()

Method to set the secrets for the given username and database

Usage

Profile$set.secrets(
  username = NA,
  password = NA,
  database = SAILDB.DEF$DATABASE
)

Arguments

username

(character|NA)
A username that relates to these secrets

password

(character|NA)
The secret to store in the keychain

database

(character|NA)
The name of the database that these secrets relate to; defaults to SAILDB.DEF$DATABASE if no name is given

Returns

A logical describing whether this action was successful


Method remove.secrets()

Method to remove secrets associated with either (a) a username and a database; or (b) all secrets associated with a database

Usage

Profile$remove.secrets(username = NA, database = SAILDB.DEF$DATABASE)

Arguments

username

(character|NA)
An optional username that relates to these secrets; if none are provided all of the secrets associated with the database will be removed

database

(character|NA)
The name of the database that these secrets relate to; defaults to SAILDB.DEF$DATABASE if no name is given

Returns

A logical describing whether this was successful


Method clone()

The objects of this class are cloneable with this method.

Usage

Profile$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.