• API Overview
  • EBICS API
  • FinTS API
  • XS2A API
  • SEPA API
Search Results for

    Class FinCredentialManager

    Helper class for simple querying of PIN, TAN, and other user choices.

    Inheritance
    System.Object
    FinCredentialManager
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Subsembly.FinTS.Online
    Assembly: Subsembly.FinTS.Core.dll
    Syntax
    public class FinCredentialManager
    Remarks

    In order to provide some very special PIN and TAN management, an application may derive from this class and override the virtual methods as needed.

    This class implements a short-lived PIN cache which remembers the PIN entered by GetPin(FinContact) for at most two minutes. If another GetPin(FinContact) call is done within this time, the cached PIN is returned instead of querying the user again.

    Constructors

    FinCredentialManager(IFinBankingPinStore, IFinCredentialForm, IFinTanProcForm, IFinTanMediaForm)

    Creates a new FinCredentialManager with the provided implementations.

    Declaration
    public FinCredentialManager(IFinBankingPinStore aPinStore, IFinCredentialForm aCredentialForm, IFinTanProcForm aTanProcForm, IFinTanMediaForm aTanMediaForm)
    Parameters
    Type Name Description
    IFinBankingPinStore aPinStore

    Optional IFinBankingPinStore implementation that provides a secure PIN storage. If provided, then a PIN will be retrieved from the PIN storage when needed. An instance of FinBankingPin can be used to directly supply a PIN. If this is null, then no PIN storage will be used and the PIN is always obtained through GetPin(FinContact)

    IFinCredentialForm aCredentialForm

    An implementation of an IFinCredentialForm. If this is null, then any attempts to get credentials from the user will just return the result NeedTan, NeedDecoupled, or Cancelled.

    IFinTanProcForm aTanProcForm

    Reference of an IFinTanProcForm implementation that will be used to prompt the user to select a TAN procedure, when needed. If you are sure that a TAN procedure will never be selected (e.g. when using RDH security), then this may be null. If this is null, then any attempts to get a TAN procedure selection from the user will just return the result SelectTanProc.

    IFinTanMediaForm aTanMediaForm

    Reference of an IFinTanMediaForm implementation that will be used to prompt the user to select a TAN media, when needed. If you are sure that a TAN media will never be selected (e.g. when using RDH security), then this may be null. If this is null, then any attempts to get a TAN procedure selection from the user will just return the result SelectTanMedia.

    See Also
    FinBankingPin
    FinBankingPinStore
    FinBankingTanProcForm
    FinBankingTanMediaForm

    FinCredentialManager(IFinBankingPinStore, IFinCredentialForm, IFinTanProcForm, IFinTanMediaForm, IFinDecoupledForm)

    Creates a new FinCredentialManager with the provided implementations.

    Declaration
    public FinCredentialManager(IFinBankingPinStore aPinStore, IFinCredentialForm aCredentialForm, IFinTanProcForm aTanProcForm, IFinTanMediaForm aTanMediaForm, IFinDecoupledForm aDecoupledForm)
    Parameters
    Type Name Description
    IFinBankingPinStore aPinStore

    Optional IFinBankingPinStore implementation that provides a secure PIN storage. If provided, then a PIN will be retrieved from the PIN storage when needed. An instance of FinBankingPin can be used to directly supply a PIN. If this is null, then no PIN storage will be used and the PIN is always obtained through GetPin(FinContact)

    IFinCredentialForm aCredentialForm

    An implementation of an IFinCredentialForm. If this is null, then any attempts to get credentials from the user will just return the result NeedTan, NeedDecoupled, or Cancelled.

    IFinTanProcForm aTanProcForm

    Reference of an IFinTanProcForm implementation that will be used to prompt the user to select a TAN procedure, when needed. If you are sure that a TAN procedure will never be selected (e.g. when using RDH security), then this may be null. If this is null, then any attempts to get a TAN procedure selection from the user will just return the result SelectTanProc.

    IFinTanMediaForm aTanMediaForm

    Reference of an IFinTanMediaForm implementation that will be used to prompt the user to select a TAN media, when needed. If you are sure that a TAN media will never be selected (e.g. when using RDH security), then this may be null. If this is null, then any attempts to get a TAN procedure selection from the user will just return the result SelectTanMedia.

    IFinDecoupledForm aDecoupledForm

    An optional implementation of an IFinDecoupledForm. If this is provided, then the form will be used whenever a result NeedDecoupled is encountered. If this is null, then any NeedDecoupled result will be handed to the plain aCredentialForm, if available.

    See Also
    FinBankingPin
    FinBankingPinStore
    FinBankingTanProcForm
    FinBankingTanMediaForm

    FinCredentialManager(IFinCredentialForm)

    LEGACY

    Declaration
    public FinCredentialManager(IFinCredentialForm aCredentialForm)
    Parameters
    Type Name Description
    IFinCredentialForm aCredentialForm

    FinCredentialManager(String)

    Creates a FinCredentialManager with a constant PIN value and without any UI.

    Declaration
    public FinCredentialManager(string sPin)
    Parameters
    Type Name Description
    System.String sPin

    If this PIN is given, then it will be returned by all GetPin(FinContact) invocations. If this is null, then ...

    Remarks

    As this credential manager does not have any UI, any attempts to get credentials will be ignored or cancelled.

    Methods

    ApproveStoredPin(FinContact)

    Is called whenever the PIN previously obtained through GetPin(FinContact) was successfully used.

    Declaration
    public virtual void ApproveStoredPin(FinContact aContact)
    Parameters
    Type Name Description
    FinContact aContact

    AuthenticateContact(FinContact)

    Declaration
    public virtual FinAuthenticateResult AuthenticateContact(FinContact aContact)
    Parameters
    Type Name Description
    FinContact aContact
    Returns
    Type Description
    FinAuthenticateResult

    ClearStoredPin(FinContact)

    Is called whenever the PIN previously obtained through GetPin(FinContact) was attempted and is definitively wrong.

    Declaration
    public virtual void ClearStoredPin(FinContact aContact)
    Parameters
    Type Name Description
    FinContact aContact

    DisputeStoredPin(FinContact)

    Is called whenever the PIN previously obtained through GetPin(FinContact) was attempted and it is unclear, whether it was OK or wrong.

    Declaration
    public virtual void DisputeStoredPin(FinContact aContact)
    Parameters
    Type Name Description
    FinContact aContact

    FindKeyFile(String)

    Find the complete path to a key file for a given security media ID.

    Declaration
    public virtual string FindKeyFile(string sSecurityMediaID)
    Parameters
    Type Name Description
    System.String sSecurityMediaID

    The security media ID that was stored in the FinContact is passed here. Usually this already is the complete path to the key file.

    Returns
    Type Description
    System.String

    The complete path to the located key file.

    Remarks

    A specialized implementation may override this method in order to provide some fancy algorithm for locating a key file. The default implementation of this method does nothing but return the parameter sSecurityMediaID as its result.

    GetCredential(FinContact, FinCredential)

    Declaration
    public virtual bool GetCredential(FinContact aContact, FinCredential aCredential)
    Parameters
    Type Name Description
    FinContact aContact
    FinCredential aCredential
    Returns
    Type Description
    System.Boolean

    If the requested credentials have been entered and confirmed by clicking [OK], then true is returned. If there is no IFinCredentialForm available, or the user cancelled the request, then false is returned.

    GetDecoupled(FinContact, FinDialogResult)

    Get a DECOUPLED confirmation from the user.

    Declaration
    public virtual FinDialogResult GetDecoupled(FinContact aContact, FinDialogResult aResult)
    Parameters
    Type Name Description
    FinContact aContact
    FinDialogResult aResult
    Returns
    Type Description
    FinDialogResult

    If the user confirms the prompt for a DECOUPLED confirmation, then Success is returned. If the user cancelled the prompt, then Cancelled is returned. If no IFinCredentialForm implementation was provided to this instance, then NeedDecoupled is returned.

    GetPin(FinContact)

    Get an Online-Banking-PIN or security media PIN or password for a particular contact.

    Declaration
    public virtual string GetPin(FinContact aContact)
    Parameters
    Type Name Description
    FinContact aContact

    The contact for which to get a PIN. This must not be null.

    Returns
    Type Description
    System.String

    GetTan(FinContact, FinDialogResult, out String, out FinResponseHHDUC)

    Get a TAN from the user.

    Declaration
    public virtual FinDialogResult GetTan(FinContact aContact, FinDialogResult aResult, out string sTan, out FinResponseHHDUC aResponseHHDUC)
    Parameters
    Type Name Description
    FinContact aContact
    FinDialogResult aResult
    System.String sTan

    Returns the entered TAN or null.

    FinResponseHHDUC aResponseHHDUC

    Returns the response HHDUC data block from the Chip-TAN card reader, or null.

    Returns
    Type Description
    FinDialogResult

    If the user successfully entered a TAN, then the parameter sTan is set and Success is returned. If the user cancelled the prompt, then Cancelled is returned. If no IFinCredentialForm implementation was provided to this instance, then NeedTan is returned.

    GetTanMedia(FinContact, FinDialogResult, out FinTanMedia)

    Let the user choose one of the TAN medias available.

    Declaration
    public virtual FinDialogResult GetTanMedia(FinContact aContact, FinDialogResult aResult, out FinTanMedia aTanMedia)
    Parameters
    Type Name Description
    FinContact aContact

    Provides the FinContact instance for which to select the TAN media.

    FinDialogResult aResult

    The list of TAN medias to select from.

    FinTanMedia aTanMedia

    Returns the selected TAN media or null.

    Returns
    Type Description
    FinDialogResult

    If the user successfully selected a TAN media, then the parameter aTanMedia must be set and Success is returned. If the user cancelled the prompt, then Cancelled is returned. If no IFinTanMediaForm implementation was provided to this instance, then SelectTanMedia is returned.

    Remarks

    This is only called when there is more than one active TAN media available to the user. If there is only a single TAN media available, then it is selected implicitly without ever calling this method.

    If a IFinTanMediaForm implementation was provided, then it will be called to select the TAN media. If none was provided, then SelectTanMedia is returned.

    GetTanProc(FinContact, FinDialogResult, out FinTanProcInfo)

    Let the user choose one of the TAN procedures available.

    Declaration
    public virtual FinDialogResult GetTanProc(FinContact aContact, FinDialogResult aResult, out FinTanProcInfo aSelectedTanProc)
    Parameters
    Type Name Description
    FinContact aContact

    Provides the FinContact instance for which to select the TAN procedure.

    FinDialogResult aResult

    Provides the list of TAN procedures from which to select.

    FinTanProcInfo aSelectedTanProc

    Returns the selected TAN procedure, or null.

    Returns
    Type Description
    FinDialogResult

    If the user successfully selected a TAN procedure, then the parameter aSelectedTanProc must be set and Success is returned. If the user cancelled the prompt, then Cancelled is returned. If no IFinTanProcForm implementation was provided to this instance, then SelectTanProc is returned.

    Remarks

    This is only called when there is more than one TAN procedure available to the user. If there is only a single TAN procedure available, then it is selected implicitly without ever calling this method.

    If a IFinTanProcForm implementation was provided, then it will be called to select the TAN procedure. If none was provided, then SelectTanProc is returned.

    ResolveResult(FinBanking, FinDialogResult)

    Attempts to resolve a result with the help from the user.

    Declaration
    public FinDialogResult ResolveResult(FinBanking aBanking, FinDialogResult aResult)
    Parameters
    Type Name Description
    FinBanking aBanking
    FinDialogResult aResult
    Returns
    Type Description
    FinDialogResult

    If the issue presented by the aResult was resolved, then the returned FinDialogResult has the Retry flag set. Otherwise Retry should be false.

    StorePin(FinContact, String)

    Store a PIN for a given contact using the global application credentials.

    Declaration
    public static void StorePin(FinContact aContact, string sPin)
    Parameters
    Type Name Description
    FinContact aContact

    Identifies the contact for which the PIN shall be stored.

    System.String sPin

    The PIN that shall be stored. If this is null, then the stored PIN is erased.

    Remarks

    Before this method is called, the method SetAppCredentials(String, String) must have been called.

    See Also
    FinBankingPinStore
    In This Article
    Back to top Copyright 2009-2025 Subsembly GmbH