public async Task <MicrosoftGraphAppAccessToken> GetAccessToken(string accessToken) { var list = MakeRequestBody(_msftAuthSettings, accessToken, TypeTokenRequest.AccessToken); MicrosoftGraphAppAccessToken appAccesToken = await MakeTokenPost(list); appAccesToken.TimeAcquired = DateTime.Now; return(appAccesToken); }
//public static Storage Instance //{ // get // { // if (_instance == null) // { // _instance = new Storage(); // } // return _instance; // } //} public void StoreToken(string id_identity, MicrosoftGraphAppAccessToken token) { var tokenStorage = new TokenStorageModel() { ID = id_identity, AccessToken = token.AccessToken, RefreshToken = token.RefreshToken, ExpiresIn = token.ExpiresIn, TimeAcquired = token.TimeAcquired }; _storage.Store <TokenStorageModel>("Token", tokenStorage); }