{"id":1371,"date":"2025-10-10T14:56:19","date_gmt":"2025-10-10T07:56:19","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/?post_type=docs&#038;p=1371"},"modified":"2025-11-12T15:04:12","modified_gmt":"2025-11-12T08:04:12","slug":"appauthen","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/axws7\/services-2\/appauthen\/","title":{"rendered":"AppAuthen"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"appauthen\">AppAuthen<\/h1>\n\n\n\n<p>AtlasX Web Service \u0e21\u0e35\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e27\u0e34\u0e2a\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a Authentication \u0e42\u0e14\u0e22\u0e19\u0e33 OAuth 2.0 \u0e21\u0e32\u0e1e\u0e31\u0e12\u0e19\u0e32\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e2b\u0e49\u0e23\u0e2d\u0e07\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23 Authentication \u0e08\u0e32\u0e01 Client App \u0e17\u0e35\u0e48\u0e2b\u0e25\u0e32\u0e01\u0e2b\u0e25\u0e32\u0e22\u0e21\u0e32\u0e01\u0e02\u0e36\u0e49\u0e19 \u0e40\u0e0a\u0e48\u0e19 Client Mobile App \u0e40\u0e1b\u0e47\u0e19\u0e15\u0e49\u0e19<\/p>\n\n\n\n<p>\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 Authentication \u0e19\u0e31\u0e49\u0e19\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e44\u0e14\u0e49 3 \u0e41\u0e1a\u0e1a \u0e44\u0e14\u0e49\u0e41\u0e01\u0e48<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>First<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16 Login \u0e40\u0e1e\u0e35\u0e22\u0e07\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e40\u0e14\u0e35\u0e22\u0e27 \u0e41\u0e25\u0e30\u0e43\u0e2b\u0e49\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e33\u0e04\u0e31\u0e0d\u0e01\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e17\u0e35\u0e48 Login \u0e01\u0e48\u0e2d\u0e19\u0e40\u0e1b\u0e47\u0e19\u0e2a\u0e33\u0e04\u0e31\u0e0d\u00a0<em>\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e04\u0e19\u0e40\u0e14\u0e34\u0e21 Login \u0e40\u0e02\u0e49\u0e32\u0e21\u0e32\u0e0b\u0e49\u0e33\u0e08\u0e30\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16 Login \u0e44\u0e14\u0e49<\/em><\/li>\n\n\n\n<li><code>Last<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16 Login \u0e40\u0e1e\u0e35\u0e22\u0e07\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e40\u0e14\u0e35\u0e22\u0e27 \u0e41\u0e25\u0e30\u0e43\u0e2b\u0e49\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e33\u0e04\u0e31\u0e0d\u0e01\u0e31\u0e1a\u0e1c\u0e39\u0e49\u0e17\u0e35\u0e48 Login \u0e17\u0e35\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e2a\u0e33\u0e04\u0e31\u0e0d\u00a0<em>\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e04\u0e19\u0e40\u0e14\u0e34\u0e21 Login \u0e40\u0e02\u0e49\u0e32\u0e21\u0e32\u0e0b\u0e49\u0e33 \u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e01\u0e48\u0e2d\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e30\u0e16\u0e39\u0e01 Logout \u0e42\u0e14\u0e22\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34<\/em><\/li>\n\n\n\n<li><code>Multiple<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e40\u0e14\u0e35\u0e22\u0e27\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16 Login \u0e44\u0e14\u0e49\u0e2b\u0e25\u0e32\u0e22\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e01\u0e31\u0e19 (\u0e04\u0e48\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19)<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e27\u0e34\u0e18\u0e35\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17-authentication\">\u0e27\u0e34\u0e18\u0e35\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 Authentication<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u0e40\u0e1b\u0e34\u0e14\u0e44\u0e1f\u0e25\u0e4c\u00a0<code>Core\/AppSettings.cs<\/code><\/li>\n\n\n\n<li>\u0e40\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e04\u0e25\u0e32\u0e2a\u00a0<code>OAuth<\/code><\/li>\n\n\n\n<li>\u0e1b\u0e23\u0e31\u0e1a\u0e41\u0e01\u0e49 property\u00a0<code>Strategy<\/code>\u00a0\u0e15\u0e32\u0e21\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>public class OAuth : IOAuth\n{\n  ...\n  public RefreshTokenStrategy Strategy { get; } = RefreshTokenStrategy.Multiple;\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">class<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">OAuth<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #267F99\">IOAuth<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  ...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">RefreshTokenStrategy<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">Strategy<\/span><span style=\"color: #000000\"> { <\/span><span style=\"color: #001080\">get<\/span><span style=\"color: #000000\">; } = <\/span><span style=\"color: #001080\">RefreshTokenStrategy<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">Multiple<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a-oauth-20\">\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a OAuth 2.0<\/h2>\n\n\n\n<p>\u0e43\u0e19\u0e44\u0e1f\u0e25\u0e4c&nbsp;<code>appsettings.json<\/code>&nbsp;\u0e21\u0e35\u0e2a\u0e48\u0e27\u0e19\u0e02\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 OAuth 2.0 \u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e2a\u0e48\u0e27\u0e19\u0e02\u0e2d\u0e07&nbsp;<code>WebServiceSettings<\/code>&nbsp;\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"oauth\">OAuth<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"WebServiceSettings\": {\n    \"OAuth\": {\n      \"AccessTokenExpires\": 300,\n      \"RefreshTokenExpires\": 604800,\n      \"AuthorizationCodeExpires\": 300,\n      \"Issuer\": \"https:\/\/localhost:5001\",\n      \"SecretKey\": \"kaq5ehRJFtPZrUBOhpif4U6+cuqpAkLCAds8K52FkuXyIcgBCkeBRBchU+b\/I5xz\"\n    }\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;WebServiceSettings&quot;<\/span><span style=\"color: #000000\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #A31515\">&quot;OAuth&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;AccessTokenExpires&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #098658\">300<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;RefreshTokenExpires&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #098658\">604800<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;AuthorizationCodeExpires&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #098658\">300<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Issuer&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/localhost:5001&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;SecretKey&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;kaq5ehRJFtPZrUBOhpif4U6+cuqpAkLCAds8K52FkuXyIcgBCkeBRBchU+b\/I5xz&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>AccessTokenExpires<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e2d\u0e32\u0e22\u0e38 Access Token \u0e21\u0e35\u0e2b\u0e19\u0e48\u0e27\u0e22\u0e40\u0e1b\u0e47\u0e19\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 \u0e2b\u0e32\u0e01\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e44\u0e27\u0e49\u0e19\u0e49\u0e2d\u0e22 \u0e08\u0e30\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e04\u0e27\u0e32\u0e21\u0e1b\u0e25\u0e2d\u0e14\u0e20\u0e31\u0e22 \u0e41\u0e15\u0e48\u0e16\u0e49\u0e32\u0e2b\u0e32\u0e01\u0e15\u0e31\u0e49\u0e07\u0e44\u0e27\u0e49\u0e21\u0e32\u0e01\u0e08\u0e30\u0e25\u0e14\u0e20\u0e32\u0e23\u0e30\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07 Server<\/li>\n\n\n\n<li><code>RefreshTokenExpires<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e2d\u0e32\u0e22\u0e38 Refresh Token \u0e21\u0e35\u0e2b\u0e19\u0e48\u0e27\u0e22\u0e40\u0e1b\u0e47\u0e19\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 \u0e43\u0e0a\u0e49\u0e43\u0e19\u0e01\u0e23\u0e13\u0e35\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e2b\u0e49 User \u0e17\u0e33\u0e01\u0e32\u0e23 Login \u0e43\u0e2b\u0e21\u0e48\u0e2b\u0e32\u0e01\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e40\u0e01\u0e34\u0e14\u0e17\u0e35\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14<\/li>\n\n\n\n<li><code>AuthorizationCodeExpires<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e2d\u0e32\u0e22\u0e38 Authorization Code<\/li>\n\n\n\n<li><code>Issuer<\/code>\u00a0\u0e04\u0e37\u0e2d url \u0e17\u0e35\u0e48\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23 OAuth 2.0<\/li>\n\n\n\n<li><code>SecretKey<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e23\u0e2b\u0e31\u0e2a\u0e25\u0e31\u0e1a\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e43\u0e0a\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e2a\u0e23\u0e49\u0e32\u0e07 Access Token<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ldap\">LDAP<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"WebServiceSettings\": {\n    \"LDAP\": {\n      \"Host\": \"cdg.co.th\",\n      \"Port\": 389,\n      \"SecureSocketLayer\": false,\n      \"DistinguishedName\": \"OU=GISC,OU=CDG,DC=cdg,DC=co,DC=th\",\n      \"AdminUser\": \"00xxxx@cdg.co.th\",\n      \"AdminPassword\": \"...\",\n      \"UserIdField\": \"samaccountname\",\n      \"UsernameField\": \"samaccountname\",\n      \"FirstNameField\": \"givenname\",\n      \"LastNameField\": \"sn\",\n      \"MailField\": \"mail\"\n    }\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;WebServiceSettings&quot;<\/span><span style=\"color: #000000\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #A31515\">&quot;LDAP&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Host&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;cdg.co.th&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Port&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #098658\">389<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;SecureSocketLayer&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">false<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;DistinguishedName&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;OU=GISC,OU=CDG,DC=cdg,DC=co,DC=th&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;AdminUser&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;00xxxx@cdg.co.th&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;AdminPassword&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;...&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;UserIdField&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;samaccountname&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;UsernameField&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;samaccountname&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;FirstNameField&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;givenname&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;LastNameField&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;sn&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;MailField&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;mail&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>Host<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e17\u0e35\u0e48\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23 LDAP<\/li>\n\n\n\n<li><code>Port<\/code>\u00a0\u0e04\u0e37\u0e2d Port \u0e02\u0e2d\u0e07\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e17\u0e35\u0e48\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23 LDAP<\/li>\n\n\n\n<li><code>SecureSocketLayer<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e23\u0e30\u0e1a\u0e38\u0e27\u0e48\u0e32\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07 LDAP \u0e23\u0e2d\u0e07\u0e23\u0e31\u0e1a SSL \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48<\/li>\n\n\n\n<li><code>DistinguishedName<\/code>\u00a0(DN) \u0e04\u0e37\u0e2d \u0e0a\u0e37\u0e48\u0e2d\u0e02\u0e2d\u0e07\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e21\u0e35\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 AD \u0e42\u0e14\u0e22 username \u0e19\u0e31\u0e49\u0e19 \u0e2d\u0e22\u0e48\u0e32\u0e07\u0e19\u0e49\u0e2d\u0e22\u0e15\u0e49\u0e2d\u0e07\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e01\u0e25\u0e38\u0e48\u0e21\u0e02\u0e2d\u0e07 Domain Admin \u0e02\u0e36\u0e49\u0e19\u0e44\u0e1b<\/li>\n\n\n\n<li><code>AdminUser<\/code>\u00a0\u0e04\u0e37\u0e2d user \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 admin<\/li>\n\n\n\n<li><code>AdminPassword<\/code>\u00a0\u0e04\u0e37\u0e2d \u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e48\u0e32\u0e19\u0e02\u0e2d\u0e07 user \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 admin<\/li>\n\n\n\n<li><code>UserIdField<\/code>\u00a0\u0e04\u0e37\u0e2d key \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 Field User Id<\/li>\n\n\n\n<li><code>UsernameField<\/code>\u00a0\u0e04\u0e37\u0e2d key \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 Field Username<\/li>\n\n\n\n<li><code>FirstNameField<\/code>\u00a0\u0e04\u0e37\u0e2d key \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 Field \u0e0a\u0e37\u0e48\u0e2d<\/li>\n\n\n\n<li><code>LastNameField<\/code>\u00a0\u0e04\u0e37\u0e2d key \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 Field \u0e19\u0e32\u0e21\u0e2a\u0e01\u0e38\u0e25<\/li>\n\n\n\n<li><code>MailField<\/code>\u00a0\u0e04\u0e37\u0e2d key \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 Field Email Address<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33-authentication\">\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33 Authentication<\/h2>\n\n\n\n<p>\u0e17\u0e35\u0e48\u0e44\u0e1f\u0e25\u0e4c&nbsp;<code>Startup.cs<\/code>&nbsp;\u0e08\u0e30\u0e21\u0e35\u0e01\u0e32\u0e23\u0e17\u0e33 dependency injection \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a Authentication \u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e43\u0e19 service \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>public class Startup\n{\n  public void ConfigureServices(IServiceCollection services)\n  {\n    \/\/ Register services\n    services.AddSingleton&lt;IUserTokenRepository, UserTokenRepository>();\n    services.AddSingleton&lt;IUserInfoRepository, UserInfoRepository>();\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">class<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">Startup<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">void<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">ConfigureServices<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">IServiceCollection<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #008000\">\/\/ Register services<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">IUserTokenRepository<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #267F99\">UserTokenRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">IUserInfoRepository<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #267F99\">UserInfoRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e0b\u0e36\u0e48\u0e07\u0e08\u0e30\u0e21\u0e35 2 interface \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e17\u0e33\u0e01\u0e32\u0e23 implement \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-iusertokenrepository\">1. IUserTokenRepository<\/h3>\n\n\n\n<p>\u0e23\u0e30\u0e1a\u0e38\u0e01\u0e32\u0e23\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 Token \u0e40\u0e0a\u0e48\u0e19 Refresh Token, FCM Token \u0e40\u0e1b\u0e47\u0e19\u0e15\u0e49\u0e19 \u0e42\u0e14\u0e22\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e21\u0e35 2 \u0e41\u0e1a\u0e1a\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-b8c0cf80 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-a31aa551 wp-block-group-is-layout-constrained\">\n<ol class=\"wp-block-list\">\n<li><code>UserTokenRepository<\/code>\u00a0\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a Token \u0e44\u0e27\u0e49\u0e17\u0e35\u0e48 Database<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-c31b90d3 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>services.AddSingleton&lt;IUserTokenRepository, UserTokenRepository>();<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">IUserTokenRepository<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #267F99\">UserTokenRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-b8c0cf80 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-a31aa551 wp-block-group-is-layout-constrained\">\n<ol start=\"2\" class=\"wp-block-list\">\n<li><code>UserTokenInMemoryRepository<\/code>\u00a0\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a Token \u0e44\u0e27\u0e49\u0e17\u0e35\u0e48 Memory \u0e40\u0e21\u0e37\u0e48\u0e2d Application Pool \u0e16\u0e39\u0e01\u0e23\u0e35\u0e2a\u0e15\u0e32\u0e23\u0e4c\u0e17 \u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e43\u0e19 Memory \u0e08\u0e30\u0e2a\u0e39\u0e0d\u0e2b\u0e32\u0e22\u00a0<em>\u0e40\u0e2b\u0e21\u0e32\u0e30\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e41\u0e2d\u0e1e\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e21\u0e35 Database \u0e41\u0e15\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e21\u0e35\u0e23\u0e30\u0e1a\u0e1a Authentication<\/em><\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-c31b90d3 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>services.AddSingleton&lt;IUserTokenRepository, UserTokenInMemoryRepository>();<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">IUserTokenRepository<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #267F99\">UserTokenInMemoryRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-iuserinforepository\">2. IUserInfoRepository<\/h3>\n\n\n\n<p>\u0e23\u0e30\u0e1a\u0e38\u0e41\u0e2b\u0e25\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e02\u0e2d\u0e07 User \u0e40\u0e21\u0e37\u0e48\u0e2d\u0e21\u0e35\u0e01\u0e32\u0e23 Login \u0e27\u0e48\u0e32\u0e08\u0e30\u0e43\u0e2b\u0e49\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 Authentication \u0e08\u0e32\u0e01\u0e41\u0e2b\u0e25\u0e48\u0e07\u0e44\u0e2b\u0e19 \u0e42\u0e14\u0e22\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e21\u0e35 4 \u0e41\u0e1a\u0e1a\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-b8c0cf80 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-a31aa551 wp-block-group-is-layout-constrained\">\n<ol start=\"1\" class=\"wp-block-list\">\n<li><code>UserInfoRepository<\/code>\u00a0\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e08\u0e32\u0e01\u0e15\u0e32\u0e23\u0e32\u0e07\u00a0<code>UM_USER<\/code>\u00a0\u0e43\u0e19 Database<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-c31b90d3 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>services.AddSingleton&lt;IUserInfoRepository, UserInfoRepository>();<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">IUserInfoRepository<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #267F99\">UserInfoRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-b8c0cf80 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-a31aa551 wp-block-group-is-layout-constrained\">\n<ol start=\"2\" class=\"wp-block-list\">\n<li><code>UserInfoLdapRepository<\/code>\u00a0\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e08\u0e32\u0e01 LDAP<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-c31b90d3 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>services.AddSingleton&lt;IUserInfoRepository, UserInfoLdapRepository>();<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">IUserInfoRepository<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #267F99\">UserInfoLdapRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-b8c0cf80 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-a31aa551 wp-block-group-is-layout-constrained\">\n<ol start=\"3\" class=\"wp-block-list\">\n<li><code>UserInfoFakeRepository<\/code>\u00a0\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23 Mockup User\u00a0<em>\u0e40\u0e2b\u0e21\u0e32\u0e30\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e41\u0e2d\u0e1e\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e21\u0e35 Database \u0e41\u0e15\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e21\u0e35\u0e23\u0e30\u0e1a\u0e1a Authentication<\/em><\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-c31b90d3 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>services.AddSingleton&lt;IUserInfoRepository, UserInfoFakeRepository>();<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">IUserInfoRepository<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #267F99\">UserInfoFakeRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-b8c0cf80 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-a31aa551 wp-block-group-is-layout-constrained\">\n<ol start=\"4\" class=\"wp-block-list\">\n<li><code>UserInfoMultiSourceRepository<\/code>\u00a0\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e08\u0e32\u0e01\u0e2b\u0e25\u0e32\u0e22 \u0e46 data source \u0e44\u0e21\u0e48\u0e27\u0e48\u0e32\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19 Database, LDAP \u0e2b\u0e23\u0e37\u0e2d Mockup User<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-c31b90d3 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>services.AddSingleton&lt;IUserInfoRepository, UserInfoMultiSourceRepository>();<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">IUserInfoRepository<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #267F99\">UserInfoMultiSourceRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-b8c0cf80 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-a31aa551 wp-block-group-is-layout-constrained\">\n<p>\u0e0b\u0e36\u0e48\u0e07\u0e43\u0e19\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19&nbsp;<code>UserInfoMultiSourceRepository<\/code>&nbsp;\u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e21\u0e35\u0e01\u0e32\u0e23\u0e17\u0e33 dependency injection repository \u0e2d\u0e37\u0e48\u0e19 \u0e46 \u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e44\u0e1f\u0e25\u0e4c&nbsp;<code>Startup.cs<\/code>&nbsp;\u0e14\u0e49\u0e27\u0e22 \u0e14\u0e31\u0e07\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e14\u0e49\u0e32\u0e19\u0e25\u0e48\u0e32\u0e07<\/p>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-c31b90d3 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly> services.AddSingleton&lt;UserInfoLdapRepository>();\n services.AddSingleton&lt;UserInfoRepository>();\n services.AddSingleton&lt;UserInfoFakeRepository>();\n services.AddSingleton&lt;IUserInfoRepository, UserInfoMultiSourceRepository>();<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">UserInfoLdapRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">UserInfoRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">UserInfoFakeRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">services<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">AddSingleton<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">IUserInfoRepository<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #267F99\">UserInfoMultiSourceRepository<\/span><span style=\"color: #000000\">&gt;();<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"customize-multi-source-repository\">Customize Multi Source Repository<\/h3>\n\n\n\n<p>\u0e43\u0e19\u0e01\u0e32\u0e23 custom \u0e01\u0e32\u0e23\u0e17\u0e33 authentication \u0e41\u0e1a\u0e1a multi source \u0e43\u0e2b\u0e49\u0e44\u0e1b\u0e41\u0e01\u0e49\u0e44\u0e02\u0e43\u0e19\u0e44\u0e1f\u0e25\u0e4c&nbsp;<code>OAuth\/Repositories\/UserInfoMultiSourceRepository.cs<\/code>&nbsp;\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e01\u0e33\u0e2b\u0e19\u0e14 Logic \u0e43\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33 authentication \u0e14\u0e49\u0e27\u0e22\u0e15\u0e31\u0e27\u0e40\u0e2d\u0e07<\/p>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-b8c0cf80 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-a31aa551 wp-block-group-is-layout-constrained\">\n<ol start=\"1\" class=\"wp-block-list\">\n<li>inject repository \u0e17\u0e35\u0e48\u0e08\u0e30\u0e43\u0e0a\u0e49\u0e43\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33 authentication \u0e25\u0e07\u0e44\u0e1b\u0e43\u0e19 constructor<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-c31b90d3 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ Inject repositories here\nprivate readonly UserInfoLdapRepository _userInfoLdapRepository;\nprivate readonly UserInfoRepository _userInfoRepository;\n\npublic UserInfoMultiSourceRepository(\n  UserInfoLdapRepository userInfoLdapRepository,\n  UserInfoRepository userInfoRepository\n)\n{\n  _userInfoLdapRepository = userInfoLdapRepository;\n  _userInfoRepository = userInfoRepository;\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #008000\">\/\/ Inject repositories here<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">private<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">readonly<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">UserInfoLdapRepository<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">_userInfoLdapRepository<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">private<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">readonly<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">UserInfoRepository<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">_userInfoRepository<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #001080\">public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">UserInfoMultiSourceRepository<\/span><span style=\"color: #000000\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">UserInfoLdapRepository<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">userInfoLdapRepository<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">UserInfoRepository<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">userInfoRepository<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">_userInfoLdapRepository<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #001080\">userInfoLdapRepository<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">_userInfoRepository<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #001080\">userInfoRepository<\/span><span style=\"color: #000000\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-b8c0cf80 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-a31aa551 wp-block-group-is-layout-constrained\">\n<ol start=\"2\" class=\"wp-block-list\">\n<li>\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e43\u0e19\u0e01\u0e32\u0e23 authentication \u0e43\u0e19 method \u0e17\u0e35\u0e48 implements \u0e21\u0e32\u0e08\u0e32\u0e01\u00a0<code>IUserInfoRepository<\/code><\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-c31b90d3 wp-block-group-is-layout-constrained\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>public interface IUserInfoRepository\n{\n  UserInfo Get(string username, string password, string dataSource);\n  UserInfo Get(int userId);\n  UserInfo Get(string username);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">public<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">interface<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">IUserInfoRepository<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">UserInfo<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">Get<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">string<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">username<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #001080\">string<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">password<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #001080\">string<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">dataSource<\/span><span style=\"color: #000000\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">UserInfo<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">Get<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">int<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">userId<\/span><span style=\"color: #000000\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">UserInfo<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">Get<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">string<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">username<\/span><span style=\"color: #000000\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e01\u0e32\u0e23\u0e19\u0e33\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\">\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e01\u0e32\u0e23\u0e19\u0e33\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"grant-type--password-resource-owner-password-credentials\">Grant Type : Password (Resource Owner Password Credentials)<\/h3>\n\n\n\n<p>\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2a\u0e48\u0e07\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e48\u0e32\u0e19\u0e02\u0e2d\u0e07\u0e15\u0e19\u0e40\u0e2d\u0e07\u0e1c\u0e48\u0e32\u0e19 Client App \u0e0b\u0e36\u0e48\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e27\u0e34\u0e18\u0e35\u0e1b\u0e01\u0e15\u0e34\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e1e\u0e27\u0e01\u0e40\u0e23\u0e32\u0e04\u0e38\u0e49\u0e19\u0e40\u0e04\u0e22 \u0e42\u0e14\u0e22\u0e40\u0e23\u0e32\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e1f\u0e2d\u0e23\u0e4c\u0e21\u0e43\u0e2b\u0e49\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e01\u0e23\u0e2d\u0e01\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e41\u0e25\u0e30\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e48\u0e32\u0e19 \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e40\u0e23\u0e32\u0e19\u0e33\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01\u0e1f\u0e2d\u0e23\u0e4c\u0e21 Request \u0e44\u0e1b\u0e22\u0e31\u0e07\u0e40\u0e27\u0e47\u0e1a\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e27\u0e34\u0e2a\u0e42\u0e14\u0e22\u0e15\u0e23\u0e07<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/portal-atlasx.cdg.co.th\/share\/Portal%20Docs\/Framework\/AXWS\/axws-appauthen-type-password.png\" alt=\"Password Grant Diagram\" title=\"null\"\/><\/figure>\n\n\n\n<ol style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>User: \u0e01\u0e23\u0e2d\u0e01\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e41\u0e25\u0e30\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e48\u0e32\u0e19 &#8211; \u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e23\u0e2d\u0e01\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e41\u0e25\u0e30\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e48\u0e32\u0e19\u0e1c\u0e48\u0e32\u0e19\u0e2b\u0e19\u0e49\u0e32 \u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e49\u0e23\u0e30\u0e1a\u0e1a\u0e02\u0e2d\u0e07 Client App \u0e42\u0e14\u0e22\u0e15\u0e23\u0e07<\/li>\n\n\n\n<li>Client App: \u0e23\u0e49\u0e2d\u0e07\u0e02\u0e2d Access Token \u0e42\u0e14\u0e22\u0e2a\u0e48\u0e07\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e41\u0e25\u0e30\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e48\u0e32\u0e19\u0e44\u0e1b\u0e22\u0e31\u0e07\u0e40\u0e27\u0e47\u0e1a\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e27\u0e34\u0e2a<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>grant_type<\/td><td>true<\/td><td>\u0e23\u0e30\u0e1a\u0e38\u0e40\u0e1b\u0e47\u0e19&nbsp;<code>password<\/code><\/td><\/tr><tr><td>username<\/td><td>true<\/td><td>\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49<\/td><\/tr><tr><td>password<\/td><td>true<\/td><td>\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e48\u0e32\u0e19\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49<\/td><\/tr><tr><td>client_id<\/td><td>false<\/td><td>\u0e04\u0e27\u0e23\u0e40\u0e1b\u0e47\u0e19 text \u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e04\u0e32\u0e14\u0e40\u0e14\u0e32\u0e44\u0e14\u0e49\u0e07\u0e48\u0e32\u0e22<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --location --request POST 'https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appauthen\/token' \\\n--header 'Content-Type: application\/x-www-form-urlencoded' \\\n--data-urlencode 'grant_type=password' \\\n--data-urlencode 'username=username1' \\\n--data-urlencode 'password=1234' \\\n--data-urlencode 'client_id=696b4176abb7d'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">curl<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">location<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">request<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0070C1\">POST<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appauthen\/token&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">header<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;Content-Type: application\/x-www-form-urlencoded&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;grant_type=password&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;username=username1&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;password=1234&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;client_id=696b4176abb7d&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"3\" style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>Web Service: \u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a Access Token \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01 Web Service \u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e21\u0e32\u0e41\u0e25\u0e49\u0e27 Client \u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a\u0e44\u0e27\u0e49\u0e17\u0e35\u0e48 Local Storage<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Key<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>access_token<\/td><td>token \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e23\u0e49\u0e2d\u0e07\u0e02\u0e2d Resource<\/td><\/tr><tr><td>token_type<\/td><td>\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 token<\/td><\/tr><tr><td>expires_in<\/td><td>\u0e2d\u0e32\u0e22\u0e38\u0e02\u0e2d\u0e07 Access Token \u0e43\u0e19\u0e2b\u0e19\u0e48\u0e27\u0e22\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35<\/td><\/tr><tr><td>refresh_token<\/td><td>token \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e23\u0e49\u0e2d\u0e07\u0e02\u0e2d Access Token \u0e43\u0e2b\u0e21\u0e48\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e2b\u0e21\u0e14\u0e2d\u0e32\u0e22\u0e38<\/td><\/tr><tr><td>error<\/td><td>\u0e23\u0e2b\u0e31\u0e2a\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14<\/td><\/tr><tr><td>error_description<\/td><td>\u0e04\u0e33\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a<\/h4>\n\n\n\n<ul style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>HTTP Status:\u00a0<code>200 OK<\/code><\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"access_token\": \"eyJhbGciO...\",\n  \"token_type\": \"bearer\",\n  \"expires_in\": 20,\n  \"refresh_token\": \"2469d199696...\"\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;access_token&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;eyJhbGciO...&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;token_type&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;bearer&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;expires_in&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #098658\">20<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;refresh_token&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;2469d199696...&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/portal-atlasx.cdg.co.th\/share\/Portal%20Docs\/Framework\/AXWS\/axws-appauthen-access-token.png\" alt=\"Access Token\" title=\"null\"\/><\/figure>\n\n\n\n<ul style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>HTTP Status:\u00a0<code>400 Bad Request<\/code><\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"error\": \"invalid_grant\",\n  \"error_description\": \"The username or password is incorrect.\"\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;error&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;invalid_grant&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;error_description&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;The username or password is incorrect.&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"4\" style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>Client App: Refresh Token \u0e40\u0e21\u0e37\u0e48\u0e2d Access Token \u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e17\u0e35\u0e48 Client App \u0e2b\u0e21\u0e14\u0e2d\u0e32\u0e22\u0e38\u0e25\u0e07<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>grant_type<\/td><td>true<\/td><td>\u0e23\u0e30\u0e1a\u0e38\u0e40\u0e1b\u0e47\u0e19&nbsp;<code>refresh_token<\/code><\/td><\/tr><tr><td>refresh_token<\/td><td>true<\/td><td>token \u0e17\u0e35\u0e48\u0e43\u0e0a\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e23\u0e49\u0e2d\u0e07\u0e02\u0e2d Access Token \u0e43\u0e2b\u0e21\u0e48<\/td><\/tr><tr><td>client_id<\/td><td>false<\/td><td>\u0e04\u0e27\u0e23\u0e40\u0e1b\u0e47\u0e19 text \u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e04\u0e32\u0e14\u0e40\u0e14\u0e32\u0e44\u0e14\u0e49\u0e07\u0e48\u0e32\u0e22<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01-1\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --location --request POST 'https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appauthen\/token' \\\n--header 'Content-Type: application\/x-www-form-urlencoded' \\\n--data-urlencode 'grant_type=refresh_token' \\\n--data-urlencode 'refresh_token=22d3bff351a94875a95fa7b8e10e4d0b' \\\n--data-urlencode 'client_id=696b4176abb7d'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">curl<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">location<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">request<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0070C1\">POST<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appauthen\/token&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">header<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;Content-Type: application\/x-www-form-urlencoded&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;grant_type=refresh_token&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;refresh_token=22d3bff351a94875a95fa7b8e10e4d0b&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;client_id=696b4176abb7d&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/portal-atlasx.cdg.co.th\/share\/Portal%20Docs\/Framework\/AXWS\/axws-appauthen-refresh-token.png\" alt=\"refresh\" title=\"null\"\/><\/figure>\n\n\n\n<ol start=\"5\" style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>Web Service: \u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a Access Token<\/li>\n<\/ol>\n\n\n\n<p>\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01 Web Service \u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e21\u0e32\u0e41\u0e25\u0e49\u0e27 Client \u0e17\u0e33\u0e01\u0e32\u0e23\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e17\u0e17\u0e35\u0e48 Local Storage<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Key<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>access_token<\/td><td>token \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e23\u0e49\u0e2d\u0e07\u0e02\u0e2d Resource<\/td><\/tr><tr><td>token_type<\/td><td>\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 token<\/td><\/tr><tr><td>expires_in<\/td><td>\u0e2d\u0e32\u0e22\u0e38\u0e02\u0e2d\u0e07 Access Token \u0e43\u0e19\u0e2b\u0e19\u0e48\u0e27\u0e22\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35<\/td><\/tr><tr><td>refresh_token<\/td><td>token \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e23\u0e49\u0e2d\u0e07\u0e02\u0e2d Access Token \u0e43\u0e2b\u0e21\u0e48\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e2b\u0e21\u0e14\u0e2d\u0e32\u0e22\u0e38<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a-1\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a<\/h4>\n\n\n\n<ul style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>HTTP Status:\u00a0<code>200 OK<\/code><\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"access_token\": \"eyJhbGciO...\",\n  \"token_type\": \"bearer\",\n  \"expires_in\": 20,\n  \"refresh_token\": \"2469d199696...\"\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;access_token&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;eyJhbGciO...&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;token_type&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;bearer&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;expires_in&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #098658\">20<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;refresh_token&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;2469d199696...&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>HTTP Status:\u00a0<code>400 Bad Request<\/code><\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"error\": \"invalid_grant\",\n  \"error description\": \"Invalid refresh_token or expired.\"\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;error&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;invalid_grant&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;error description&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;Invalid refresh_token or expired.&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u0e15\u0e32\u0e23\u0e32\u0e07\u0e23\u0e2b\u0e31\u0e2a\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14\">\u0e15\u0e32\u0e23\u0e32\u0e07\u0e23\u0e2b\u0e31\u0e2a\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>HTTP Status Code<\/th><th>Error Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>400<\/td><td>unsupported_grant_type<\/td><td>\u0e1e\u0e32\u0e23\u0e32\u0e21\u0e34\u0e40\u0e15\u0e2d\u0e23\u0e4c grant_type \u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07 \u0e2b\u0e23\u0e37\u0e2d \u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e23\u0e2d\u0e07\u0e23\u0e31\u0e1a<\/td><\/tr><tr><td>400<\/td><td>invalid_grant<\/td><td>\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e2b\u0e23\u0e37\u0e2d\u0e23\u0e2b\u0e31\u0e2a\u0e1c\u0e48\u0e32\u0e19\u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07, Refresh Token \u0e2b\u0e21\u0e14\u0e2d\u0e32\u0e22\u0e38\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07<\/td><\/tr><tr><td>400<\/td><td>invalid_request<\/td><td>\u0e44\u0e21\u0e48\u0e23\u0e30\u0e1a\u0e38\u0e2b\u0e23\u0e37\u0e2d\u0e23\u0e30\u0e1a\u0e38\u0e1e\u0e32\u0e23\u0e32\u0e21\u0e34\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07<\/td><\/tr><tr><td>401<\/td><td>&#8211;<\/td><td>\u0e44\u0e21\u0e48\u0e21\u0e35\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e4c\u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e2b\u0e23\u0e37\u0e2d Access Token \u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"grant-type--authorization-code-with-pkce-recommended\">Grant Type : Authorization Code with PKCE (Recommended)<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/portal-atlasx.cdg.co.th\/share\/Portal%20Docs\/Framework\/AXWS\/axws-appauthen-type-code.png\" alt=\"Password Grant Diagram\" title=\"null\"\/><\/figure>\n\n\n\n<ol style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>Access App : \u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e01\u0e14\u0e1b\u0e38\u0e48\u0e21\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e49\u0e23\u0e30\u0e1a\u0e1a (Sign In) \u0e17\u0e35\u0e48 Client App \u0e42\u0e14\u0e22 Client App \u0e2a\u0e23\u0e49\u0e32\u0e07\u0e04\u0e48\u0e32\u0e41\u0e1a\u0e1a\u0e2a\u0e38\u0e48\u0e21 \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e0a\u0e49\u0e40\u0e1b\u0e47\u0e19\u00a0<code>code_verifier (v)<\/code>\u00a0\u0e41\u0e25\u0e30\u0e08\u0e30\u0e16\u0e39\u0e01 Hash \u0e40\u0e1b\u0e47\u0e19\u00a0<code>code_challenge ($)<\/code><\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e1b\u0e38\u0e48\u0e21\u0e25\u0e47\u0e2d\u0e01\u0e2d\u0e34\u0e19\u0e14\u0e49\u0e27\u0e22-html\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e1b\u0e38\u0e48\u0e21\u0e25\u0e47\u0e2d\u0e01\u0e2d\u0e34\u0e19\u0e14\u0e49\u0e27\u0e22 HTML<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;a\n  href=\"https:\/\/localhost:5001\/api\/appauthen\/authorize?\n  response_type=code&amp;\n  code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&amp;\n  code_challenge_method=S256&amp;\n  client_id=YOUR_CLIENT_ID&amp;\n  redirect_uri=YOUR_CALLBACK_URL&amp;\n  state=xyzABC123\"\n>\n  Sign In\n&lt;\/a><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #800000\">&lt;a<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #E50000\">href<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #A31515\">&quot;https:\/\/localhost:5001\/api\/appauthen\/authorize?<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">  response_type=code&amp;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">  code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&amp;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">  code_challenge_method=S256&amp;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">  client_id=YOUR_CLIENT_ID&amp;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">  redirect_uri=YOUR_CALLBACK_URL&amp;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">  state=xyzABC123&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #800000\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  Sign In<\/span><\/span>\n<span class=\"line\"><span style=\"color: #800000\">&lt;\/a&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"2\" style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>Redirect with $ : Client App \u0e40\u0e1b\u0e34\u0e14 Web Browser \u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e01\u0e31\u0e1a Redirect \u0e44\u0e1b\u0e23\u0e49\u0e2d\u0e07\u0e02\u0e2d Authorization Code \u0e42\u0e14\u0e22\u0e41\u0e19\u0e1a $ \u0e44\u0e1b\u0e14\u0e49\u0e27\u0e22<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>response_type<\/td><td>true<\/td><td>\u0e23\u0e30\u0e1a\u0e38\u0e40\u0e1b\u0e47\u0e19&nbsp;<code>code<\/code><\/td><\/tr><tr><td>redirect_uri<\/td><td>true<\/td><td>Uri \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e2b\u0e49 Redirect \u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e17\u0e35\u0e48 App \u0e2b\u0e23\u0e37\u0e2d Web<\/td><\/tr><tr><td>code_challenge<\/td><td>true<\/td><td>\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e17\u0e4c hash code_verifier<\/td><\/tr><tr><td>code_challenge_method<\/td><td>true<\/td><td>\u0e23\u0e30\u0e1a\u0e38\u0e40\u0e1b\u0e47\u0e19&nbsp;<code>S256<\/code><\/td><\/tr><tr><td>state<\/td><td>false<\/td><td>(\u0e41\u0e19\u0e30\u0e19\u0e33) text \u0e17\u0e35\u0e48\u0e08\u0e30\u0e16\u0e39\u0e01\u0e2a\u0e48\u0e07\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e43\u0e2b\u0e49 Client \u0e40\u0e21\u0e37\u0e48\u0e2d Redirect \u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e17\u0e35\u0e48 App \u0e2b\u0e23\u0e37\u0e2d Web \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e1b\u0e49\u0e2d\u0e07\u0e01\u0e31\u0e19\u0e01\u0e32\u0e23\u0e42\u0e08\u0e21\u0e15\u0e35\u0e41\u0e1a\u0e1a Cross-site Request Forgery (CSRF)<\/td><\/tr><tr><td>client_id<\/td><td>false<\/td><td>\u0e04\u0e27\u0e23\u0e40\u0e1b\u0e47\u0e19 text \u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e04\u0e32\u0e14\u0e40\u0e14\u0e32\u0e44\u0e14\u0e49\u0e07\u0e48\u0e32\u0e22<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01-2\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --location --request GET 'https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appauthen\/authorize?client_id=696b4176abb7d&amp;code_challenge=FC93C580004199BC60CBDC878486F227382A20A8D55DDB109E44AE2F5EA7896F&amp;code_challenge_method=S256&amp;redirect_uri=https:\/\/localhost:5001\/applogin&amp;response_type=code&amp;state=state123'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">curl<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">location<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">request<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0070C1\">GET<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appauthen\/authorize?client_id=696b4176abb7d&amp;code_challenge=FC93C580004199BC60CBDC878486F227382A20A8D55DDB109E44AE2F5EA7896F&amp;code_challenge_method=S256&amp;redirect_uri=https:\/\/localhost:5001\/applogin&amp;response_type=code&amp;state=state123&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"3\" style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>Redirect to Login with $ : Web Browser \u0e40\u0e23\u0e35\u0e22\u0e01\u0e44\u0e1b\u0e17\u0e35\u0e48 Authorization Server \u0e41\u0e25\u0e30 Server \u0e17\u0e33\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a $ \u0e44\u0e27\u0e49 \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e27\u0e48\u0e32\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e23\u0e30\u0e1a\u0e1a\u0e2d\u0e22\u0e39\u0e48\u0e41\u0e25\u0e49\u0e27\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 \u0e2b\u0e32\u0e01\u0e44\u0e21\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e23\u0e30\u0e1a\u0e1a\u0e08\u0e30 Redirect \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e44\u0e1b\u0e2b\u0e19\u0e49\u0e32 Login (\u0e02\u0e49\u0e2d 4) \u0e2b\u0e32\u0e01\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e23\u0e30\u0e1a\u0e1a\u0e2d\u0e22\u0e39\u0e4b\u0e41\u0e25\u0e49\u0e27 \u0e08\u0e30 Redirect \u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e2a\u0e48\u0e07 Authorization Code \u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e17\u0e35\u0e48 Web Browser (\u0e02\u0e49\u0e2d 6)<\/li>\n\n\n\n<li>Returns to Login Form : Authorization Server \u0e17\u0e33\u0e01\u0e32\u0e23 Redirect \u0e44\u0e1b\u0e2b\u0e19\u0e49\u0e32 Login<\/li>\n\n\n\n<li>Submits Credentials : \u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e33\u0e01\u0e32\u0e23\u0e01\u0e23\u0e2d\u0e01 Username \u0e41\u0e25\u0e30 Password \u0e41\u0e25\u0e30 submit \u0e44\u0e1b\u0e22\u0e31\u0e07 Authorization Server<\/li>\n\n\n\n<li>Redirect with code (a) : Authorization Server \u0e17\u0e33\u0e01\u0e32\u0e23 redirect \u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b Web Browser \u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 Authorization Code (a)<\/li>\n\n\n\n<li>Redirect to App with code (a) : Web Browser \u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23 redirect \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e2a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 Authorization Code \u0e44\u0e1b\u0e22\u0e31\u0e07 Client App \u0e1c\u0e48\u0e32\u0e19\u0e17\u0e32\u0e07 Url<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23-redirect-\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b-client-app\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23 Redirect \u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b Client App<\/h4>\n\n\n\n<ul style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>Web App<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>HTTP\/1.1 302 Found\nLocation:http:\/\/localhost:4200\/callback?code=ed25980...&amp;state=xyzABC123<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0070C1\">HTTP<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #098658\">1.1<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #098658\">302<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">Found<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">Location:http:<\/span><span style=\"color: #008000\">\/\/localhost:4200\/callback?code=ed25980...&amp;state=xyzABC123<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>Android App<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>HTTP\/1.1 302 Found\nLocation: com.giscompany.myapp:\/\/authorize?code=ed25980...&amp;state=xyzABC123<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0070C1\">HTTP<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #098658\">1.1<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #098658\">302<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">Found<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">Location: <\/span><span style=\"color: #001080\">com<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">giscompany<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">myapp<\/span><span style=\"color: #000000\">:<\/span><span style=\"color: #008000\">\/\/authorize?code=ed25980...&amp;state=xyzABC123<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"8\" style=\"padding-right:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\" class=\"wp-block-list\">\n<li>Request Token (Authorization Code Exchange)<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>grant_type<\/td><td>true<\/td><td>\u0e23\u0e30\u0e1a\u0e38\u0e40\u0e1b\u0e47\u0e19&nbsp;<code>authorization_code<\/code><\/td><\/tr><tr><td>code_verifier<\/td><td>true<\/td><td>code \u0e17\u0e35\u0e48 Client App \u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e27\u0e49 (\u0e02\u0e49\u0e2d 1)<\/td><\/tr><tr><td>code<\/td><td>true<\/td><td>Authorization Code (a)<\/td><\/tr><tr><td>redirect_uri<\/td><td>true<\/td><td>\u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e01\u0e31\u0e1a (\u0e02\u0e49\u0e2d 2)<\/td><\/tr><tr><td>client_id<\/td><td>false<\/td><td>\u0e04\u0e27\u0e23\u0e40\u0e1b\u0e47\u0e19 text \u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e04\u0e32\u0e14\u0e40\u0e14\u0e32\u0e44\u0e14\u0e49\u0e07\u0e48\u0e32\u0e22<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01-3\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --location --request POST 'https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appauthen\/token' \\\n--header 'Content-Type: application\/x-www-form-urlencoded' \\\n--data-urlencode 'grant_type=authorization_code' \\\n--data-urlencode 'client_id=696b4176abb7d' \\\n--data-urlencode 'code_verifier=C60CBDC878486F' \\\n--data-urlencode 'code=a93788bc764d441a8479299f4c22a897' \\\n--data-urlencode 'redirect_uri=https:\/\/localhost:50001\/applogin'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">curl<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">location<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">request<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0070C1\">POST<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appauthen\/token&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">header<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;Content-Type: application\/x-www-form-urlencoded&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;grant_type=authorization_code&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;client_id=696b4176abb7d&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;code_verifier=C60CBDC878486F&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;code=a93788bc764d441a8479299f4c22a897&#39;<\/span><span style=\"color: #000000\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">--<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">-<\/span><span style=\"color: #001080\">urlencode<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;redirect_uri=https:\/\/localhost:50001\/applogin&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e44\u0e14\u0e49 Token Response \u0e21\u0e32\u0e01\u0e47\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e23\u0e30\u0e1a\u0e27\u0e19\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a\u0e40\u0e01\u0e47\u0e1a\u0e25\u0e07 Local Storage \u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e01\u0e31\u0e1a\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19 Refresh Token \u0e02\u0e2d\u0e07 Grant Type : Password \u0e44\u0e14\u0e49\u0e40\u0e25\u0e22<\/p>\n","protected":false},"featured_media":0,"parent":1369,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-1371","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/1371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/comments?post=1371"}],"version-history":[{"count":20,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/1371\/revisions"}],"predecessor-version":[{"id":3173,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/1371\/revisions\/3173"}],"up":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/1369"}],"wp:attachment":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/media?parent=1371"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=1371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}