إذا كنت ترغب في إضافة مصادقة Secure (JSON Web) المستندة إلى مشاريعك بسرعة ، فلا تتردد في التحقق من وثائق Auth0 وخطة مجانية على Developer.Auth0.com |
لإضافة مكتبة ، ما عليك سوى تحرير ملف JSON الصحيح الموجود في views/website/libraries
. كل لغة تحصل على ملف خاص بها. تشترك مكتبات متعددة في نفس ملف اللغة.
لإضافة لغة جديدة ، ما عليك سوى إضافة ملف JSON في نفس المجلد مثل الآخرين. سيتم التعرف عليه تلقائيا. إذا قمت بإضافة لغة جديدة ، فستحتاج إلى توفير أيقونة مناسبة لها ووضعها في مجلد img
.
فيما يلي مثال تم تعليقه على ملف لغة .NET ( 0-.NET.json
). يجب أن يكون لجميع الحقول قيم صالحة ما لم يذكر:
{
// Language name (unique)
"name" : ".NET" ,
// Unique identifier that will be used as a CSS class
// for this language (only valid CSS class names).
"uniqueClass" : "net" ,
// The language icon, SVG format preferred, should be placed
// in /img directory.
"image" : "/img/1.svg" ,
// The color of header that displays the name of the language
// and the icon. This is a valid CSS color definition.
"bgColor" : "rgb(42, 168, 229)" ,
// An array of libraries for this language.
"libs" : [
{
// In case the library suffered from a vulnerability, the
// minimum version in which the vuln was fixed must be
// listed here. Optional (can be null).
"minimumVersion" : "1.0.1" , // or null
// Supported features, true for supported,
// false for not supported.
"support" : {
"sign" : true ,
"verify" : true ,
"iss" : true ,
"sub" : true ,
"aud" : true ,
"exp" : true ,
"nbf" : true ,
"iat" : true ,
"jti" : true ,
"hs256" : true ,
"hs384" : true ,
"hs512" : true ,
"rs256" : true ,
"rs384" : true ,
"rs512" : true ,
"es256" : true ,
"es384" : true ,
"es512" : true ,
"ps256" : true ,
"ps384" : true ,
"ps512" : true ,
"eddsa" : true
} ,
// Author URL, can be GitHub profile, personal page
// company page, etc. Can be null.
"authorUrl" : "https://www.microsoft.com" , // or null
// Author name.
"authorName" : "Microsoft" ,
// For the star count, this is the GitHub repository path,
// (usually user/repo). Can be null (no star count shown).
"gitHubRepoPath" : "AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet" , // or null
// URL for source code.
"repoUrl" : "https://github.com/MSOpenTech/azure-activedirectory-identitymodel-extensions-for-dotnet" ,
// Install command, can be HTML or plain text.
"installCommandHtml" : "Install-Package<br><a href="https://www.nuget.org/packages/System.IdentityModel.Tokens.Jwt/">System.IdentityModel.Tokens.Jwt</a>"
}
]
}
أولاً ، قم بتثبيت التبعيات المطلوبة:
npm install
من أجل بناء (وتشغيل) تنفيذ المشروع:
./node_modules/.bin/grunt
ستجد الملفات التي تم إنشاؤها في dist
Directory. بالنسبة للموقع ، يمكنك تشغيل خادم بجذره. على سبيل المثال: http-server dist/website
. تقوم المهمة grunt
الافتراضية بتشغيل خادم على https://127.0.0.1:8000 والساعات للتغييرات.
لتشغيل الاختبارات ، تنفيذ:
./node_modules/.bin/grunt test
انظر إلى نهاية Gruntfile للمهام الشائعة الأخرى.