ISecurityPackage.CopyCredentials

Syntax

CopyCredentials(Value: ICredentials): ICredentials;

Parameters

Value. A credentials source.

Description

The CopyCredentials method copies credentials from the object that is passed as the Value parameter.

Example

Sub Main;

Var

MB: IMetabase;

Def: IMetabaseDefinition;

Man: IMetabaseManager;

Packs: IScPacks;

Pack: IScPack;

Sp: ISecurityPackage;

Sc: ISecurityConnection;

Cr,Cr_new: ICredentials;

LoS: ILogonSession;

Begin

MB:=MetabaseClass.Active;

Def:=MB.Definition;

LoS:=MB.LogonSession;

Man:=Def.Manager;

Packs:=Man.Packs;

Pack:=Packs.Item(0);

Sp:=Pack.Package;

Sc:=LoS.PrimaryConnection;

Cr:=Sc.Credentials;

Cr_new:=Sp.CreateCredentials(AuthenticationMode.Domain);

Cr_new:=Sp.CopyCredentials(Cr);

End Sub Main;

After executing the example the Cr_new variable contains the credentials, copied from credentials of an active repository.

See also:

ISecurityPackage