asp.net mvc auth2.0简化版——客户端
public partial class Login : Page { public string client_id = "123456789"; public string getCodeUrl = "http://localhost:8080/?client_id={0}>response_type={1}>redirect_uri={2}>scope={3}>state={4}"; public string getTokenUrl = "http://localhost:8080/Auth/Token?code={0}>grant_type={1}>client_id={2}"; public string getUserUrl = "http://localhost:8080/Auth/UserInfo?token={0}"; protected void Page_Load(object sende...
asp.net mvc auth2.0简化版——服务端
public class AuthController : Controller { private static readonly List<string> client_id_list = new List<string>() { "123456789" }; private static readonly List<string> response_type_list = new List<string>() { "code" }; private static readonly List<UserInfo> user_list = new List<UserInfo>(); private static readonly List<UserCode> user_code_list = new List<UserCode>(); private s...