CopyCredentials(Value: ICredentials): ICredentials;
Value. A credentials source.
The CopyCredentials method copies credentials from the object that is passed as the Value parameter.
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: