AuthenticationType: MetabaseAuthenticationType;
AuthenticationType: Prognoz.Platform.Interop.Metabase.MetabaseAuthenticationType;
The AuthenticationType property returns the way of authentication used in repository.
The property is outdated, use IMetabasePolicy.CheckUserPassword.
To execute the example add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Policy: IMetabasePolicy;
AP: IMetabaseAuthenticationPolicy;
MAT: MetabaseAuthenticationType;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
Policy := MS.Policy;
AP := Policy.AuthenticationPolicy;
MAT := AP.AuthenticationType;
If MAT = MetabaseAuthenticationType.Unknown Then
Debug.WriteLine("Unknown");
End If;
If MAT = MetabaseAuthenticationType.External Then
Debug.WriteLine("External");
End If;
If MAT = MetabaseAuthenticationType.Mixed Then
Debug.WriteLine("Mixed");
End If;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
…
Public Shared Sub Main(Params : StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Policy: IMetabasePolicy;
AP: IMetabaseAuthenticationPolicy;
MAT: MetabaseAuthenticationType;
Begin
MB := Params.Metabase;
MS := MB.Security;
Policy := MS.Policy;
AP := Policy.AuthenticationPolicy;
MAT := AP.AuthenticationType;
If MAT = MetabaseAuthenticationType.meautyUnknown Then
System.Diagnostics.Debug.WriteLine("Unknown");
End If;
If MAT = MetabaseAuthenticationType.meautyExternal Then
System.Diagnostics.Debug.WriteLine("External");
End If;
If MAT = MetabaseAuthenticationType.meautyMixed Then
System.Diagnostics.Debug.WriteLine("Mixed");
End If;
End Sub;
After executing the example the authentication in use of the current repository is displayed into console.
See also: