Package tigase.auth.credentials

## Interface Credentials

- All Known Implementing Classes:
    `AuthRepository.DefaultCredentials`, `AuthRepository.SingleCredential`

      public interface Credentials

  Interface implemented by classes handling user login credentials. In implementations of this interface multiple credentials for single account may be stored but for single credentialId, ie. different credentials for different authentication mechanisms.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static interface` | `Credentials.Decoder` | Interface implemented by credentials decoder converting from value stored in database to the form represented by implementation of Entry interface.
    `static interface` | `Credentials.Encoder` | Interface implemented by credentials encoder converting them from plaintext value to encoded form stored in the database.
    `static interface` | `Credentials.Entry` | Interface required to be implemented by classes representing credential entry.
    `static interface` | `Credentials.RawEntry` | Interface implemented by classes used as DTO for credentials read from repository.s

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `DEFAULT_CREDENTIAL_ID` |
    `static java.lang.String` | `DEFAULT_USERNAME` | Deprecated.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `canLogin()` | Checks if account can perform logging-in
    `AuthRepository.AccountStatus` | `getAccountStatus()` |
    `Credentials.Entry` | `getEntryForMechanism​(java.lang.String mechanism)` | Find a credential for specified mechanism
    `Credentials.Entry` | `getFirst()` | Returns first available instance of credentials entry
    `BareJID` | `getUser()` | Returns bare jid of an account
    `boolean` | `isAccountDisabled()` | Checks if account is disabled

- - ### Field Detail

    - #### DEFAULT_CREDENTIAL_ID

          static final java.lang.String DEFAULT_CREDENTIAL_ID

      See Also:
        Constant Field Values

    - #### DEFAULT_USERNAME

          @Deprecated
          static final java.lang.String DEFAULT_USERNAME

      Deprecated.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### canLogin

          boolean canLogin()

      Checks if account can perform logging-in

    - #### getEntryForMechanism

          Credentials.Entry getEntryForMechanism​(java.lang.String mechanism)

      Find a credential for specified mechanism
      Returns:
        instance of an entry if available or null

    - #### getFirst

          Credentials.Entry getFirst()

      Returns first available instance of credentials entry
      Returns:
        first available instance of credentials entry

    - #### getUser

          BareJID getUser()

      Returns bare jid of an account
      Returns:
        bare jid of an account

    - #### isAccountDisabled

          boolean isAccountDisabled()

      Checks if account is disabled

    - #### getAccountStatus

          AuthRepository.AccountStatus getAccountStatus()

      Returns:
        account status of the account