%Wallet.Secret
abstract persistent class %Wallet.Secret extends %SYS.Wallet.Secret
SQL Table Name: %Wallet.Secret
This is the base class for all wallet secret implementations. Each secret defines a storage mechanism, given by the Storage property, which must be a subclass of %Wallet.Storage. The default storage mechanism is %Wallet.LocalStorage. Secrets must exist in a %Wallet.Collection. Access to the secret is governed by the resource defined by the collection. The collection name is specified as part of the secret name: // create a collection:
set status = ##class(%Wallet.Collection).Create(
"ExampleCollection", {
"Resource": "MyCustomResource"
})
// create a secret named "MySecret" containing the given user & password:
set status = ##class(%Wallet.KeyValue).Create(
"ExampleCollection.MySecret", {
"Secret":{"user":"neal","password":"my_secret_password"}
})
// update the password:
set status = ##class(%Wallet.KeyValue).Modify(
"ExampleCollection.MySecret", {
"Secret":{"user":"neal","password":"my_new_password"}
})
// udpate the password using array syntax:
set props("Secret") = {"user":"neal", "password":"my_newer_password"}
set status = ##class(%Wallet.KeyValue).Modify("ExampleCollection.MySecret", .props)
Property Inventory
Method Inventory
Properties
property Name as %String (MAXLEN = 128, PATTERN = "1(1""%"",1A).(1AN,1""-"",1""_"")1""."".(1AN,1""-"",1""_"",1""."")") [ Required ];
Name of the secret. This is used to identify the secret in the Create(), Modify() and Delete() methods.
This may only contain alphanumeric characters or ".", "_" or "-", and may start with a "%".
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize()
property Secret as %String) [ Transient ];
Input only. The secret value to store. The format will vary depending on the secret type.
Property methods: SecretDisplayToLogical(), SecretGet(), SecretIsValid(), SecretLogicalToDisplay(), SecretLogicalToOdbc(), SecretNormalize(), SecretSet()
property Secret64 as %String) [ Transient ];
Input only. The secret value to store, expressed as a base 64 encoded string.
Property methods: Secret64DisplayToLogical(), Secret64Get(), Secret64IsValid(), Secret64LogicalToDisplay(), Secret64LogicalToOdbc(), Secret64Normalize(), Secret64Set()
Methods
Create a copy of the secret named name with the name newName.
This performs a deep copy. The properties and secret value are copied to the new secret.
Create a secret with the given name and property values.
name must be a valid, unique name.
properties defines a set of key-value pairs defining the metadata for each secret and/or the secret value. These may be specified as a subscripted array or as a dynamic object.
name must be a valid, unique name.
properties defines a set of key-value pairs defining the metadata for each secret and/or the secret value. These may be specified as a subscripted array or as a dynamic object.
Delete the named secret.
classmethod Exists(name As %String, obj As %Wallet.Secret, sc As %Status) as %Boolean
Returns true if the named secret exists.
If true, a reference to the secret will be returned in obj.
If false sc will contain the error details.
If true, a reference to the secret will be returned in obj.
If false sc will contain the error details.
Returns the value of the stored secret. This method requires %Admin_Wallet:USE.
If successful the secret value will be returned. On error an exception will be thrown.
Modify a secret with the given name and updated property values.
name must be a valid name referencing an existing Secret.
properties defines a set of key-value pairs defining the metadata for each secret and/or the secret value. These may be specified as a subscripted array or as a dynamic object.
name must be a valid name referencing an existing Secret.
properties defines a set of key-value pairs defining the metadata for each secret and/or the secret value. These may be specified as a subscripted array or as a dynamic object.
method NameSet(val) as %Status
Indexes
index (NameIdx on Name) [IdKey, Type = key];
Index methods: NameIdxCheck(), NameIdxDelete(), NameIdxExists(), NameIdxOpen(), NameIdxSQLCheckUnique(), NameIdxSQLExists(), NameIdxSQLFindPKeyByConstraint(), NameIdxSQLFindRowIDByConstraint()
Inherited Members
Inherited Methods
- %%CLASSNAMELogicalToStorage()
- %%CLASSNAMEStorageToLogical()
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %ComposeOid()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %InitExtentData()
- %InsertBatch()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %KillExtentData()
- %LoadFromMemory()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
- StorageExportGet()
- StorageImportSet()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
Storage
Gray indicates storage defined by superclasses.
Storage Model: Storage (%Wallet.Secret)
^|$$$SecurityMapWallet|WALLET("SecretD")(ID) |
= | %%CLASSNAME
Storage
Collection
Version
|