Esempio n. 1
0
        public async Task<IAuthenticatedLastFmCredentials> GetMobileSessionCredentials(string username, string password, string appId,
            string appSecret)
        {
            var cred = new AppCredentials(this.endpoint, appId, appSecret);

            var sessionKey = await this.Auth.GetMobileSession(cred, username, password, appId);

            var newCred = new MobileSessionCredentials(this.endpoint, appId, appSecret, sessionKey.Typed.Session.Key);

            return newCred;
        }
Esempio n. 2
0
        public async Task<ILastFmCredentials> GetAppCredentials(string appId, string appSecret)
        {
            var cred = new AppCredentials(this.endpoint, appId, appSecret);

            var token = await this.Auth.GetToken(cred);

            return cred;

            //var newCred = new DesktopTokenCredentials(this.endpoint, appId, appSecret, token.Typed.Token);

            //return newCred;
        }