﻿using Dapper;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using XOMNI.CMS.BackEnd.Models;
using XOMNI.SDK.Master;
using XOMNI.SDK.Master.Models;

namespace XOMNI.CMS.BackEnd.Managers
{
    public class OAuthAppManager : IOAuthAppManager
    {
        private MasterAPIClientContext MasterAPIClientContext;

        public OAuthAppManager(MasterAPIClientContext masterAPIClientContext)
        {
            this.MasterAPIClientContext = masterAPIClientContext;
        }
        public Task<OAuthAppDetail> GetPredefinedAppDetailsAsync(string tenantName)
        {
            var client = MasterAPIClientContext.OAuthAppsManagementClient();
            return client.GetPredefinedOAuthAppDetailsAsync(tenantName);
        }
    }
}