@@ -0,0 +1,1143 @@
+package ir.asparsa.hobbytaste.core.manager;%0A%0Aimport android.text.TextUtils;%0A%0Aimport javax.inject.Inject;%0Aimport javax.inject.Singleton;%0A%0A/**%0A * @author hadi%0A * @since 12/2/2016 AD%0A */%0A@Singleton%0Apublic class AuthorizationManager %7B%0A%0A    private final Object tokenSync = new Object();%0A%0A    private String token;%0A%0A    @Inject%0A    PreferenceManager mPreferenceManager;%0A%0A    @Inject%0A    public AuthorizationManager() %7B%0A    %7D%0A%0A    public String getToken() %7B%0A        loadToken();%0A        return token;%0A    %7D%0A%0A    public void setToken(String token) %7B%0A        synchronized (tokenSync) %7B%0A            this.token = token;%0A            mPreferenceManager.put(PreferenceManager.PREFERENCES_KEY_AUTHENTICATION, token);%0A        %7D%0A    %7D%0A%0A    public boolean isAuthenticated() %7B%0A        loadToken();%0A        return !TextUtils.isEmpty(token);%0A    %7D%0A%0A    private void loadToken() %7B%0A        if (TextUtils.isEmpty(token)) %7B%0A            synchronized (tokenSync) %7B%0A                if (TextUtils.isEmpty(token)) %7B%0A                    token = mPreferenceManager.get(PreferenceManager.PREFERENCES_KEY_AUTHENTICATION, %22%22);%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

implement AuthorizationManager