{"id":963,"date":"2025-08-10T09:52:00","date_gmt":"2025-08-10T01:52:00","guid":{"rendered":"https:\/\/www.vcidc.net\/blog\/?p=963"},"modified":"2025-08-10T09:52:00","modified_gmt":"2025-08-10T01:52:00","slug":"dexun-telecommunication%e6%8e%a8%e8%8d%90%ef%bc%9a%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%ae%e5%92%8c%e4%bd%bf%e7%94%a8laas%e5%ae%9e%e7%8e%b0%e5%8d%95%e7%82%b9%e7%99%bb%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.vcidc.net\/blog\/963.html","title":{"rendered":"DeXun Telecommunication\u63a8\u8350\uff1a\u5982\u4f55\u914d\u7f6e\u548c\u4f7f\u7528LAAS\u5b9e\u73b0\u5355\u70b9\u767b\u5f55"},"content":{"rendered":"<p><p>LAAS\uff08Liberty Alliance Authentication Service\uff09\u662f\u4e00\u79cd\u7528\u4e8e\u63d0\u4f9b\u5355\u70b9\u767b\u5f55\uff08SSO\uff09\u548c\u8054\u5408\u8eab\u4efd\u9a8c\u8bc1\u670d\u52a1\u7684\u89e3\u51b3\u65b9\u6848\u3002\u672c\u6587\u5c06\u6307\u5bfc\u60a8\u5982\u4f55\u914d\u7f6e\u548c\u4f7f\u7528LAAS\uff0c\u4ee5\u5b9e\u73b0\u8de8\u591a\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u5168\u8bbf\u95ee\u3002<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.vcidc.net\/blog\/wp-content\/uploads\/2025\/07\/9j1yI2.jpg\" alt=\"DeXun Telecommunication\u63a8\u8350\uff1a\u5982\u4f55\u914d\u7f6e\u548c\u4f7f\u7528LAAS\u5b9e\u73b0\u5355\u70b9\u767b\u5f55\" title=\"DeXun Telecommunication\u63a8\u8350\uff1a\u5982\u4f55\u914d\u7f6e\u548c\u4f7f\u7528LAAS\u5b9e\u73b0\u5355\u70b9\u767b\u5f55\"><\/p>\n<\/p>\n<p><h2>\u4efb\u52a1\uff1a\u914d\u7f6eLAAS\u4ee5\u5b9e\u73b0\u5355\u70b9\u767b\u5f55<\/h2>\n<\/p>\n<p><p>\u672c\u6587\u5c06\u5e2e\u52a9\u60a8\u5b8c\u6210\u4ee5\u4e0b\u4efb\u52a1\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5b89\u88c5\u548c\u914d\u7f6eLAAS\u670d\u52a1\u5668<\/li>\n<li>\u8bbe\u7f6e\u7528\u6237\u8d26\u6237\u548c\u89d2\u8272<\/li>\n<li>\u914d\u7f6e\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4ee5\u4f7f\u7528LAAS\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1<\/li>\n<\/ul>\n<p><h2>\u64cd\u4f5c\u524d\u7684\u51c6\u5907<\/h2>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u6709\u4ee5\u4e0b\u51c6\u5907\u5de5\u4f5c\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u4e00\u53f0\u670d\u52a1\u5668\u6216VPS\uff0c\u5b89\u88c5\u6709Linux\u64cd\u4f5c\u7cfb\u7edf<\/li>\n<li>\u6839\u6743\u9650\u8bbf\u95ee<\/li>\n<li>Apache\u670d\u52a1\u5668<\/li>\n<li>PHP\u73af\u5883<\/li>\n<\/ul>\n<p><h2>\u5b89\u88c5\u548c\u914d\u7f6eLAAS\u670d\u52a1\u5668<\/h2>\n<\/p>\n<p><h3>1. \u5b89\u88c5Apache\u548cPHP<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u786e\u4fddApache\u548cPHP\u5df2\u5b89\u88c5\u5728\u60a8\u7684\u670d\u52a1\u5668\u4e0a\u3002<\/p>\n<\/p>\n<p><pre><code>sudo apt-get update<\/p>\r\n<p>sudo apt-get install apache2 php libapache2-mod-php<\/code><\/pre>\n<\/p>\n<p><h3>2. \u4e0b\u8f7dLAAS\u6e90\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u4eceLAAS\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6e90\u4ee3\u7801\u6216\u514b\u9686Git\u4ed3\u5e93\u3002<\/p>\n<\/p>\n<p><pre><code>git clone https:\/\/github.com\/liberty-alliance\/liberty-idp-v2.git<\/p>\r\n<p>cd liberty-idp-v2<\/code><\/pre>\n<\/p>\n<p><h3>3. \u914d\u7f6eLAAS<\/h3>\n<\/p>\n<p><p>\u7f16\u8f91LAAS\u914d\u7f6e\u6587\u4ef6\uff0c\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u3001\u670d\u52a1\u5668\u4fe1\u606f\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code>sudo nano config\/identity-provider.xml<\/code><\/pre>\n<\/p>\n<p><p>\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u627e\u5230\u4ee5\u4e0b\u90e8\u5206\u5e76\u66ff\u6362\u4e3a\u60a8\u7684\u6570\u636e\u5e93\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code>&lt;property name=\"db.url\" value=\"jdbc:mysql:\/\/localhost:3306\/laas_db?useSSL=false\" \/&gt;<\/p>\r\n<p>&lt;property name=\"db.user\" value=\"root\" \/&gt;<\/p>\r\n<p>&lt;property name=\"db.password\" value=\"your_password\" \/&gt;<\/code><\/pre>\n<\/p>\n<p><h3>4. \u542f\u7528LAAS\u6a21\u5757<\/h3>\n<\/p>\n<p><p>\u5728Apache\u4e2d\u542f\u7528\u5fc5\u8981\u7684\u6a21\u5757\u3002<\/p>\n<\/p>\n<p><pre><code>sudo a2enmod rewrite<\/code><\/pre>\n<\/p>\n<p><h3>5. \u91cd\u542fApache\u670d\u52a1<\/h3>\n<\/p>\n<p><p>\u91cd\u542fApache\u670d\u52a1\u4ee5\u5e94\u7528\u66f4\u6539\u3002<\/p>\n<\/p>\n<p><pre><code>sudo systemctl restart apache2<\/code><\/pre>\n<\/p>\n<p><h2>\u8bbe\u7f6e\u7528\u6237\u8d26\u6237\u548c\u89d2\u8272<\/h2>\n<\/p>\n<p><h3>1. \u767b\u5f55LAAS\u7ba1\u7406\u754c\u9762<\/h3>\n<\/p>\n<p><p>\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95ee <strong>http:\/\/your_server_ip\/laas_admin<\/strong> \u5e76\u4f7f\u7528\u7ba1\u7406\u5458\u8d26\u6237\u767b\u5f55\u3002<\/p>\n<\/p>\n<p><h3>2. \u521b\u5efa\u7528\u6237\u548c\u89d2\u8272<\/h3>\n<\/p>\n<p><p>\u5728LAAS\u7ba1\u7406\u754c\u9762\u4e2d\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u7528\u6237\u548c\u89d2\u8272\uff0c\u5e76\u4e3a\u7528\u6237\u5206\u914d\u89d2\u8272\u3002<\/p>\n<\/p>\n<ul>\n<li>\u70b9\u51fb\u201cUsers\u201d\u83dc\u5355\uff0c\u521b\u5efa\u65b0\u7528\u6237\u3002<\/li>\n<li>\u70b9\u51fb\u201cRoles\u201d\u83dc\u5355\uff0c\u521b\u5efa\u65b0\u89d2\u8272\uff0c\u5e76\u5206\u914d\u76f8\u5e94\u7684\u6743\u9650\u3002<\/li>\n<\/ul>\n<p><h2>\u914d\u7f6e\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f<\/h2>\n<\/p>\n<p><h3>1. \u4fee\u6539\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u914d\u7f6e<\/h3>\n<\/p>\n<p><p>\u4fee\u6539\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4ee5\u4f7f\u7528LAAS\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1\u3002<\/p>\n<\/p>\n<p><pre><code>sudo nano \/path\/to\/client\/application\/config.php<\/code><\/pre>\n<\/p>\n<p><p>\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\uff1a<\/p>\n<\/p>\n<p><pre><code>$config['auth']['laas'] = array(<\/p>\r\n<p>    'server_url' => 'http:\/\/your_server_ip\/laas',<\/p>\r\n<p>    'client_id' => 'your_client_id',<\/p>\r\n<p>    'client_secret' => 'your_client_secret'<\/p>\r\n<p>);<\/code><\/pre>\n<\/p>\n<p><h3>2. \u4f7f\u7528LAAS\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1<\/h3>\n<\/p>\n<p><p>\u5728\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fdb\u884cLAAS\u8eab\u4efd\u9a8c\u8bc1\uff1a<\/p>\n<\/p>\n<p><pre><code>use LibertyAlliance\\IDP\\Authentication\\SSO;<\/p>\r\n\r\n<p>try {<\/p>\r\n<p>    $sso = new SSO($config['auth']['laas']);<\/p>\r\n<p>    $sso->authenticate();<\/p>\r\n<p>} catch (\\Exception $e) {<\/p>\r\n<p>    echo \"Authentication failed: \" . $e->getMessage();<\/p>\r\n<p>}<\/code><\/pre>\n<\/p>\n<p><h2>\u64cd\u4f5c\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898\u548c\u6ce8\u610f\u4e8b\u9879<\/h2>\n<\/p>\n<ul>\n<li>\u786e\u4fddLAAS\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u7684\u7f51\u7edc\u8fde\u63a5\u6b63\u5e38\u3002<\/li>\n<li>\u68c0\u67e5\u6570\u636e\u5e93\u8fde\u63a5\u914d\u7f6e\u662f\u5426\u6b63\u786e\u3002<\/li>\n<li>\u786e\u4fdd\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u4f7f\u7528\u7684\u5ba2\u6237\u7aefID\u548c\u5bc6\u94a5\u4e0eLAAS\u670d\u52a1\u5668\u4e0a\u6ce8\u518c\u7684\u76f8\u5339\u914d\u3002<\/li>\n<li>\u5982\u679c\u9047\u5230\u8ba4\u8bc1\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5LAAS\u670d\u52a1\u5668\u4e0a\u7684\u7528\u6237\u548c\u89d2\u8272\u914d\u7f6e\u3002<\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u6210\u529f\u914d\u7f6e\u548c\u4f7f\u7528LAAS\u6765\u5b9e\u73b0\u5355\u70b9\u767b\u5f55\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>LAAS\uff08Liberty Alliance Authentication Service\uff09\u662f\u4e00\u79cd\u7528\u4e8e\u63d0\u4f9b\u5355\u70b9\u767b\u5f55\uff08SSO\uff09\u548c\u8054\u5408\u8eab\u4efd\u9a8c\u8bc1\u670d\u52a1\u7684\u89e3\u51b3\u65b9\u6848\u3002\u672c\u6587\u5c06\u6307\u5bfc\u60a8\u5982\u4f55\u914d\u7f6e\u548c\u4f7f\u7528LAAS\uff0c\u4ee5\u5b9e\u73b0\u8de8\u591a\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u5168\u8bbf\u95ee\u3002 \u4efb\u52a1\uff1a\u914d\u7f6eLAAS&#8230;<\/p>\n","protected":false},"author":1,"featured_media":964,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[217,381,19],"topic":[],"class_list":["post-963","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-overseas-server","tag-apache","tag-laas","tag-19"],"_links":{"self":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts\/963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/comments?post=963"}],"version-history":[{"count":1,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts\/963\/revisions"}],"predecessor-version":[{"id":966,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts\/963\/revisions\/966"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/media\/964"}],"wp:attachment":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/media?parent=963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/categories?post=963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/tags?post=963"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/topic?post=963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}