using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Formats.Asn1.AsnWriter;

namespace AudioWallpaper.SSO {
    public class AuthConfig {
        public String clientId;
        public Uri redirectUri;
        public String scope;
        public Uri discoveryUri;
        public String authorityUrl = "http://localhost:8080/realms/ysit";
        public String tokenEndpoint = "http://localhost:8080/realms/ysit/protocol/openid-connect/token";
        public String authorizationEndpoint = "http://localhost:8080/realms/ysit/protocol/openid-connect/auth";
        public String revocationEndpoint = "http://localhost:8080/realms/ysit/protocol/openid-connect/revoke";
        public String userInfoEndpoint = "http://localhost:8080/realms/ysit/protocol/openid-connect/userinfo";
        //访问令牌失效后最大刷新次数
        public int maxRefreshCount = 3;
        //获取用户信息失败后最大尝试次数
        public int maxGetUserInfoCount = 3;

        public AuthConfig() {
            this.clientId = "yiconnect";
            this.redirectUri = new Uri("http://127.0.0.1:5000/");
            this.scope = "openid email profile offline_access";
            this.discoveryUri = new Uri("http://localhost:8080/realms/ysit/.well-known/openid-configuration");
        }

        public AuthConfig(String clientId,Uri redirectUri) {
            this.clientId = clientId;
            this.redirectUri = redirectUri;
            this.scope = "openid email profile offline_access";
            this.discoveryUri = new Uri("http://localhost:8080/realms/ysit/.well-known/openid-configuration");
        }

    }
}
