Package tigase.auth.impl

## Class ScramCallbackHandler

- java.lang.Object
- - tigase.auth.impl.ScramCallbackHandler

- All Implemented Interfaces:
    `javax.security.auth.callback.CallbackHandler`, `AuthRepositoryAware`, `Aware`, `DomainAware`, `MechanismNameAware`, `SessionAware`

      public class ScramCallbackHandler
      extends java.lang.Object
      implements javax.security.auth.callback.CallbackHandler, AuthRepositoryAware, SessionAware, DomainAware, MechanismNameAware

  Implementation of CallbackHandler to support authentication using SASL SCRAM-* authentication mechanism.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ScramCallbackHandler()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `handle​(javax.security.auth.callback.Callback[] callbacks)` |
    `protected void` | `handleAuthorizeCallback​(javax.security.sasl.AuthorizeCallback authCallback)` |
    `protected void` | `handleCallback​(javax.security.auth.callback.Callback callback)` |
    `protected void` | `handleNameCallback​(javax.security.auth.callback.NameCallback nc)` |
    `protected void` | `handlePBKDIterationsCallback​(PBKDIterationsCallback callback)` |
    `protected void` | `handleSaltCallback​(SaltCallback callback)` |
    `protected void` | `handleSaltedPasswordCallbackCallback​(SaltedPasswordCallback callback)` |
    `void` | `setAuthRepository​(AuthRepository repo)` | Sets AuthRepository.
    `void` | `setDomain​(java.lang.String domain)` | Sets name of domain from XMPP Stream.
    `void` | `setMechanismName​(java.lang.String mechanismName)` |
    `void` | `setSession​(XMPPResourceConnection session)` | Sets XMPP Session.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ScramCallbackHandler

          public ScramCallbackHandler()

  - ### Method Detail

    - #### handle

          public void handle​(javax.security.auth.callback.Callback[] callbacks)
                      throws java.io.IOException,
                             javax.security.auth.callback.UnsupportedCallbackException

      Specified by:
        `handle` in interface `javax.security.auth.callback.CallbackHandler`
      Throws:
        `java.io.IOException`
        `javax.security.auth.callback.UnsupportedCallbackException`

    - #### setMechanismName

          public void setMechanismName​(java.lang.String mechanismName)

      Specified by:
        `setMechanismName` in interface `MechanismNameAware`

    - #### setAuthRepository

          public void setAuthRepository​(AuthRepository repo)

      Description copied from interface: `AuthRepositoryAware`
      Sets AuthRepository.
      Specified by:
        `setAuthRepository` in interface `AuthRepositoryAware`
      Parameters:
        `repo` - AuthRepository.

    - #### setDomain

          public void setDomain​(java.lang.String domain)

      Description copied from interface: `DomainAware`
      Sets name of domain from XMPP Stream.
      Specified by:
        `setDomain` in interface `DomainAware`
      Parameters:
        `domain` - domain name

    - #### setSession

          public void setSession​(XMPPResourceConnection session)

      Description copied from interface: `SessionAware`
      Sets XMPP Session.
      Specified by:
        `setSession` in interface `SessionAware`
      Parameters:
        `session` - XMPP session.

    - #### handleAuthorizeCallback

          protected void handleAuthorizeCallback​(javax.security.sasl.AuthorizeCallback authCallback)
                                          throws javax.security.sasl.SaslException

      Throws:
        `javax.security.sasl.SaslException`

    - #### handleCallback

          protected void handleCallback​(javax.security.auth.callback.Callback callback)
                                 throws javax.security.auth.callback.UnsupportedCallbackException,
                                        java.io.IOException

      Throws:
        `javax.security.auth.callback.UnsupportedCallbackException`
        `java.io.IOException`

    - #### handleNameCallback

          protected void handleNameCallback​(javax.security.auth.callback.NameCallback nc)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### handlePBKDIterationsCallback

          protected void handlePBKDIterationsCallback​(PBKDIterationsCallback callback)
                                               throws javax.security.sasl.SaslException

      Throws:
        `javax.security.sasl.SaslException`

    - #### handleSaltCallback

          protected void handleSaltCallback​(SaltCallback callback)
                                     throws javax.security.sasl.SaslException

      Throws:
        `javax.security.sasl.SaslException`

    - #### handleSaltedPasswordCallbackCallback

          protected void handleSaltedPasswordCallbackCallback​(SaltedPasswordCallback callback)
                                                       throws javax.security.sasl.SaslException

      Throws:
        `javax.security.sasl.SaslException`