Package org.silverpeas.mobile.client.common

## Class AuthentificationManager

- java.lang.Object
- - org.silverpeas.mobile.client.common.AuthentificationManager

-     public class AuthentificationManager
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `USER_PROFIL` |
    `static String` | `XSilverpeasSession` |
    `static String` | `XSTKN` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addHeader​(String key, String value)` |
    `void` | `authenticateOnSilverpeas​(String login, String password, String domainId, com.google.gwt.user.client.Command attempt)` |
    `void` | `clearCache()` |
    `void` | `clearLocalStorage()` | Clean data in local storage.
    `String` | `decryptPassword​(String passwordEncrysted)` | Decrypt password in local storage.
    `String` | `getHeader​(String key)` |
    `static AuthentificationManager` | `getInstance()` |
    `void` | `injectAuthenticationHttpHeaders​(com.google.gwt.http.client.RequestBuilder builder)` |
    `FullUserDTO` | `loadUser()` |
    `void` | `logout()` |
    `void` | `storeUser​(DetailUserDTO user, UserProfileDTO profil, String login, String password, String domainId)` |
    `void` | `updateAvatarInCache​(String avatarData)` |

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

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

- - ### Field Detail

    - #### USER_PROFIL

          public static final String USER_PROFIL

      See Also:
        Constant Field Values

    - #### XSTKN

          public static final String XSTKN

      See Also:
        Constant Field Values

    - #### XSilverpeasSession

          public static final String XSilverpeasSession

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AuthentificationManager

          public AuthentificationManager()

  - ### Method Detail

    - #### getInstance

          public static AuthentificationManager getInstance()

    - #### addHeader

          public void addHeader​(String key,
                                String value)

    - #### getHeader

          public String getHeader​(String key)

    - #### storeUser

          public void storeUser​(DetailUserDTO user,
                                UserProfileDTO profil,
                                String login,
                                String password,
                                String domainId)

    - #### updateAvatarInCache

          public void updateAvatarInCache​(String avatarData)

    - #### clearLocalStorage

          public void clearLocalStorage()

      Clean data in local storage.

    - #### loadUser

          public FullUserDTO loadUser()

    - #### decryptPassword

          public String decryptPassword​(String passwordEncrysted)

      Decrypt password in local storage.
      Parameters:
        `passwordEncrysted` -
      Returns:

    - #### authenticateOnSilverpeas

          public void authenticateOnSilverpeas​(String login,
                                               String password,
                                               String domainId,
                                               com.google.gwt.user.client.Command attempt)

    - #### injectAuthenticationHttpHeaders

          public void injectAuthenticationHttpHeaders​(com.google.gwt.http.client.RequestBuilder builder)

    - #### logout

          public void logout()

    - #### clearCache

          public void clearCache()