Take security to the next level with JWT Authentication.
Using RSA Keys (RS256)
By default, CoCart JWT uses HS256 (HMAC SHA-256) for token signing. You can switch to RS256 (RSA SHA-256) for enhanced security, especially in distributed systems.1. Generate RSA KeysFirst, generate a private/public key pair:
2. Configure KeysAdd these filters to a custom must-use plugin:
// Set the algorithm to RS256add_filter( 'cocart_jwt_auth_algorithm', function( $algorithm ) { return 'RS256';});// Set the private key for token signing.add_filter( 'cocart_jwt_auth_secret_private_key', function( $key ) { return file_get_contents( ABSPATH . 'path/to/private.key' );});// Set the public key for token validation.add_filter( 'cocart_jwt_auth_secret_public_key', function( $key ) { return file_get_contents( ABSPATH . 'path/to/public.key' );});
Store your keys securely and never commit them to version control. Consider using environment variables or WordPress constants in wp-config.php to store the key paths.
1. Key Storage ExampleA secure way to configure keys using constants:
// In wp-config.phpdefine( 'COCART_JWT_AUTH_PRIVATE_KEY_PATH', '/secure/path/private.key' );define( 'COCART_JWT_AUTH_PUBLIC_KEY_PATH', '/secure/path/public.key' );// In your codeadd_filter( 'cocart_jwt_auth_secret_private_key', function( $key ) { return file_get_contents( COCART_JWT_AUTH_PRIVATE_KEY_PATH );});add_filter( 'cocart_jwt_auth_secret_public_key', function( $key ) { return file_get_contents( COCART_JWT_AUTH_PUBLIC_KEY_PATH );});
4. Using Key Strings DirectlyAlternatively, you can use the RSA key strings directly in your code:
While using key strings directly in code is possible, it’s recommended to store them in secure environment variables or files for better security and key management.
Benefits of RS256
Asymmetric Encryption: Different keys for signing and verification.
Better Security: Private key can be kept secret on the authentication server.
Scalability: Public key can be distributed to multiple verification servers.
Standard Compliance: Widely used in enterprise applications.
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"CoCart API","colors":{"primary":"#6a42d7","light":"#6a42d7","dark":"#5F32D9"},"logo":{"light":"https://mintcdn.com/cocartheadlessllc/FOR-BxFAXTD5zZae/logo/light.svg?fit=max\u0026auto=format\u0026n=FOR-BxFAXTD5zZae\u0026q=85\u0026s=730b3e24b322cc10b648a7dc28525d15","dark":"https://mintcdn.com/cocartheadlessllc/FOR-BxFAXTD5zZae/logo/dark.svg?fit=max\u0026auto=format\u0026n=FOR-BxFAXTD5zZae\u0026q=85\u0026s=76a657f0cc27c177eb7aaca2ab3e1df4","href":"https://docs.cocartapi.com"},"favicon":"favicon.png","api":{"playground":{"display":"interactive"}},"appearance":{"default":"system"},"background":{"decoration":"gradient","color":{"light":"#FEFDFB","dark":"#18181B"}},"navbar":{"links":[{"href":"https://docs.cocartapi.com/llms.txt","label":"llms.txt"},{"href":"https://docs.cocartapi.com/llms-full.txt","label":"llms-full.txt"},{"href":"https://cocartapi.com/community/?ref=mintlify","label":"Discord"}],"primary":{"type":"github","href":"https://github.com/co-cart/co-cart"}},"footer":{"socials":{"x":"https://twitter.com/cocartapi","facebook":"https://www.facebook.com/cocartapi","linkedin":"https://www.linkedin.com/company/cocart-headless","github":"https://github.com/cocart-headless","website":"https://cocartapi.com/?ref=mintlify"},"links":[{"header":"Product","items":[{"label":"Pricing","href":"https://cocartapi.com/pricing?ref=mintlify"},{"label":"Blog","href":"https://cocartapi.com/blog?ref=mintlify"},{"label":"Showcase","href":"https://cocartapi.com/showcase?ref=mintlify"},{"label":"Try the API","href":"https://cocartapi.com/try-free-demo?ref=mintlify"}]},{"header":"For Developers","items":[{"label":"Suggest a Feature","href":"https://cocartapi.com/suggest-a-feature?ref=mintlify"},{"label":"Roadmap","href":"https://cocartapi.com/roadmap?ref=mintlify"},{"label":"Translate CoCart","href":"https://translate.cocartapi.com/?ref=mintlify"}]},{"header":"Company","items":[{"label":"Merch Store","href":"https://swag.cocartheadless.com/?ref=cocartapidotcom"},{"label":"Terms \u0026 Conditions","href":"https://cocartapi.com/terms-and-conditions-polar?ref=mintlify"},{"label":"Refund Policy","href":"https://cocartapi.com/refund-policy?ref=mintlify"},{"label":"Support Policy","href":"https://cocartapi.com/support-policy?ref=mintlify"},{"label":"Security Policy","href":"https://cocartapi.com/security-policy?ref=mintlify"}]}]},"seo":{"metatags":{"robots":"index","description":"Decoupling WooCommerce for the modern storefront","keywords":"woocommerce, headless, api, rest api, cart, carts, ecommerce, wordpress, headless woocommerce, woocommerce cart, woocommerce carts, cocart, cocart api, cocart headless"},"indexing":"navigable"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"system"},"banner":{"content":"Documentation is still being updated. Some content maybe unfinished.","dismissible":true},"errors":{"404":{"redirect":false,"title":"I can't be found","description":"What ever **happened** to this _page_?"}},"contextual":{"options":["copy","view",{"title":"Translate Page","description":"Translate this page with Google Translate","icon":"language","href":{"base":"https://translate.google.com/translate","query":[{"key":"sl","value":"en"},{"key":"tl","value":"auto"},{"key":"u","value":"https://docs.cocartapi.com$path"}]}},"chatgpt","claude","perplexity","mcp","cursor","vscode",{"title":"Ask Gemini","description":"Ask Google Gemini about the current page","icon":"sparkle","href":{"base":"https://gemini.google.com/app","query":[{"key":"q","value":"Ask question about https://docs.cocartapi.com$path.md"}]}}],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cocartheadlessllc","hasAudioNarration":false,"actualSubdomain":"cocartheadlessllc","customDomains":["docs.cocartapi.com"],"gitSource":{"type":"github","owner":"cocart-headless","repo":"cocart-api-documentation","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10a3219ffae5051c3f921a"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6ae91e42dd662a242ab7ae2b:success","clientVersion":"0.0.4436","searchFilterCounts":[{"language":"default","tag":"Documentation","count":233},{"language":"default","tag":"API Reference","count":138},{"language":"default","tag":"API v2","count":78},{"language":"default","tag":"Cart","count":66},{"language":"default","tag":"API v1 (Deprecated in future)","count":49},{"language":"default","tag":"User Guides","count":40},{"language":"default","tag":"Tutorials","count":36},{"language":"default","tag":"Products","count":27},{"language":"default","tag":"Support Centre","count":18},{"language":"default","tag":"My Account","count":15}],"searchSettings":{"fullPageSearch":true}},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--rounded-sm: 4px;--rounded: 4px;--rounded-md: 4px;--rounded-lg: 4px;--rounded-xl: 4px;--rounded-xt: 4px;--rounded-2xl: 4px;--rounded-search: 4px;--rounded-3xl: 4px;--rounded-full: 4px}::selection{background-color:rgb(var(--primary))}body,input,#category-select,.dropdown-item,#table-of-contents{}#hero{margin:6rem auto 1.5rem;max-width:70rem;h1 {\n text-align: center; font-size: 24px; font-weight: 600; margin-bottom: 2rem;\n }}#sidebar-content{background-color:rgb(var(--primary)/.1)}.dark #sidebar-content{background-color:rgb(var(--background-dark)/.1)}#content-container{}.custom-container{margin:6rem auto 1.5rem}.custom-container a.card{max-width:320px}.bg-primary\\/10{background-color:rgb(var(--primary)/.1)}.bg-primary:not(.group .group-hover\\:fill-primary-dark,ul#sidebar-group li a svg,div.bottom-0){--tw-bg-opacity: 1;background-color:rgb(var(--background-dark)/var(--tw-bg-opacity))}.dark\\:bg-primary-light:is(.dark *):not(.group .group-hover\\:fill-primary-dark,ul#sidebar-group li a svg,div.bottom-0){--tw-bg-opacity: 1;background-color:rgb(var(--background-light)/var(--tw-bg-opacity))}.\\[\\\u0026\\>details\\>summary\\]\\:rounded-none>details>summary{border-radius:0}.\\[\\\u0026\\>details\\]\\:border-0>details{border-width:0}.\\[\\\u0026\\>details\\]\\:rounded-none>details{border-radius:0}@media screen and (min-width: 928px){#content-container{margin-left:-3rem;margin-right:3rem}#content-container>div{max-width:68rem}#page-context-menu-button{\u0026 span{text-indent:-9999px}}}@media (max-width: 926px){#header{margin-top:5.125rem}}"}]}
{"page":{"pagePath":"getting-started/jwt/advanced-configuration","slug":"/getting-started/jwt/advanced-configuration","pageMetadata":{"title":"Advanced Configuration","description":"Take security to the next level with JWT Authentication.","og:title":"Advanced Configuration for CoCart JWT Authentication","href":"/getting-started/jwt/advanced-configuration","hidden":false},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Take security to the next level with JWT Authentication.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`using-rsa-keys-rs256`,children:`Using RSA Keys (RS256)`}),`\n`,_jsx(_components.p,{children:`By default, CoCart JWT uses HS256 (HMAC SHA-256) for token signing. You can switch to RS256 (RSA SHA-256) for enhanced security, especially in distributed systems.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`1. Generate RSA Keys`})}),`\n`,_jsx(_components.p,{children:`First, generate a private/public key pair:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Generate private key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` genpkey`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -algorithm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` RSA`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -out`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` private.key`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -pkeyopt`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rsa_keygen_bits:2048`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Generate public key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rsa`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -pubout`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -in`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` private.key`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -out`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` public.key`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`2. Configure Keys`})}),`\n`,_jsx(_components.p,{children:`Add these filters to a custom must-use plugin:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Set the algorithm to RS256`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add_filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cocart_jwt_auth_algorithm'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$algorithm`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'RS256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Set the private key for token signing.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add_filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cocart_jwt_auth_secret_private_key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` file_get_contents`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ABSPATH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'path/to/private.key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Set the public key for token validation.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add_filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cocart_jwt_auth_secret_public_key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` file_get_contents`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ABSPATH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'path/to/public.key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Store your keys securely and never commit them to version control. Consider using environment variables or WordPress constants in `,_jsx(_components.code,{children:`wp-config.php`}),` to store the key paths.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`1. Key Storage Example`})}),`\n`,_jsx(_components.p,{children:`A secure way to configure keys using constants:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// In wp-config.php`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`define`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'COCART_JWT_AUTH_PRIVATE_KEY_PATH'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/secure/path/private.key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`define`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'COCART_JWT_AUTH_PUBLIC_KEY_PATH'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/secure/path/public.key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// In your code`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add_filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cocart_jwt_auth_secret_private_key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` file_get_contents`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`COCART_JWT_AUTH_PRIVATE_KEY_PATH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add_filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cocart_jwt_auth_secret_public_key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` file_get_contents`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`COCART_JWT_AUTH_PUBLIC_KEY_PATH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`4. Using Key Strings Directly`})}),`\n`,_jsx(_components.p,{children:`Alternatively, you can use the RSA key strings directly in your code:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`50`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`50`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add_filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cocart_jwt_auth_algorithm'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$algorithm`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'RS256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add_filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cocart_jwt_auth_secret_private_key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \u003c\u003c\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`EOD`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`-----BEGIN PRIVATE KEY-----`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDL+eJwzzKROIYM`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`CxsEWygFNhRk5rfAhVxleG7MSBzRZR9eJtXbNQYbvckhoggBaYOi77SfmGF1xa4L`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`BcaaC73X6O5XTCxGf36CVKFt8SGpZ5RQVi6hbiy4QD+7/tsur/J1IX+8ZRHSaEb4`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`uugvgrP/WYyhWDTw21HG+eObG9pNLysIWLDLlDQGQapq96NoiM6KbnUtYa+T2yS/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`M84f0CU9bw3fKijXScJwdp9Jn72GpusB51o4WbhY0x0qY37cWD1+q6lzX6Yitfyb`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`aNRxvgmbyA9sBUXOyxiCHXnCYqmDhj8j2BBq2uaMJo8uTj2Ihsb3H2B3qYv96n8s`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`WpQiOLjZAgMBAAECggEACfR3ozbRinnePO870dIbGWoCw8vo0uoPUNp4Wdr5IRUU`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`21T84fZsBmWUT+JnDp6WMJkPUSywMP3FWT9ean1BNizlmPgcPxKQ246C1GlM0cY+`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`3E7gdrt4TkPAeI3fJ5+pryLD569tF75EHHaOx2bTHxbBQMybxNeHXbUrcRICbPrW`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`h3fgiDVqh8+yQcWQ6LEaYsb2qO918ubkBF1clBEEjI0+NckdybpZ5V7idPjujyzh`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`jTOHa2gyvk6HgV5dBtsWFfGdzFtlCieu8CV+rGwhrm4x/R0BFZmYvNciifjNHCux`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Hm+brpyTF7x/BVP2K4S++rlY6Pkw1W3Mg1qQTKMQKwKBgQDrrG++MO7x9USsfz5g`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`uMlz/5Hd+o7aaqKCT8Ksqe5vqgpAvHap4rUZRElLTiaZtU/Ox/6BYjPn5e1bG1cV`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`jPcSiyH6rbUjLa1t03q+ZT9+RvVUTcaMuvSkUlMqMHp0HhBWHmmohh6fYcqfDehj`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`7kWZmgDBBDAe6F9+8CaZcjMAowKBgQDdkZUl+zcG+v/yo1gKXAb7JbTRJ15Y6eyl`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`N1hnVseHG8Eah4/0EA/9HTpElieUQwnQ3UJ6t68bSJNqGxCKqw2xffJP+EY7mYhe`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`xaeB5+7J4C2o9wb2BIk7C4Di1JdS+PIQtafdAsTdnHIMO9olCh0e1t7cu/CyjBFj`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`eC9dZdasUwKBgQC+nmqDWvDpo4g4PXMmqE/JEx3YfaCt6TIoVHsRTSEeEFraoZUZ`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`M9Vm6mSeFEgEazJx/jFMVTHGj6K73hFBzRLKXN7O81FfcsKj4jmVZi9E4//qgD3n`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`9g+KGUxLA4sIAIkWHuM2+8QpBd/tZkJhEYgaBQY3GDwTw7/53CRcWJIIIQKBgClk`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`L/u3cXExZK0cTK8qv/cc9Sl5dEuh755xt2cetAmOasWc+4x5j7MWSbNUZbJxz5yg`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`KPIp7GFpbniM88sj51v4DlNYKy6pIOurev5uqJI3+e+trjQ5ZrWMEZjOZDKQ5Q+w`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`D9re0I4h0sBsUfVHbWc8dse/qFiCiCEP67FD/BWXAoGBAKRpS1QgwNceOD1OiH/q`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`50v6hQFXzBTjQXh4r4yVkGu7XJtxf/2I0hfUOFBXn9L6hMcacqQIOntMkARFDWUo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`PbHzuurEVSOXyivhZ5utXIKpH8wnxw4odzPcmIwUKQbcanmaikEgsZufMMVlnG4u`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`z/mGBpbzVSyJILT3D8oSF/Z0`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`-----END PRIVATE KEY-----`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`EOD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add_filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cocart_jwt_auth_secret_public_key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \u003c\u003c\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`EOD`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`-----BEGIN PUBLIC KEY-----`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy/nicM8ykTiGDAsbBFso`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`BTYUZOa3wIVcZXhuzEgc0WUfXibV2zUGG73JIaIIAWmDou+0n5hhdcWuCwXGmgu9`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`1+juV0wsRn9+glShbfEhqWeUUFYuoW4suEA/u/7bLq/ydSF/vGUR0mhG+LroL4Kz`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/1mMoVg08NtRxvnjmxvaTS8rCFiwy5Q0BkGqavejaIjOim51LWGvk9skvzPOH9Al`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`PW8N3yoo10nCcHafSZ+9hqbrAedaOFm4WNMdKmN+3Fg9fqupc1+mIrX8m2jUcb4J`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`m8gPbAVFzssYgh15wmKpg4Y/I9gQatrmjCaPLk49iIbG9x9gd6mL/ep/LFqUIji4`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`2QIDAQAB`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`-----END PUBLIC KEY-----`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`EOD`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`While using key strings directly in code is possible, it’s recommended to store them in secure environment variables or files for better security and key management.`})}),`\n`,_jsx(Heading,{level:`2`,id:`benefits-of-rs256`,children:`Benefits of RS256`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Asymmetric Encryption`}),`: Different keys for signing and verification.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Better Security`}),`: Private key can be kept secret on the authentication server.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Scalability`}),`: Public key can be distributed to multiple verification servers.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Standard Compliance`}),`: Widely used in enterprise applications.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Advanced Configuration","description":"Take security to the next level with JWT Authentication.","og:title":"Advanced Configuration for CoCart JWT Authentication","href":"/getting-started/jwt/advanced-configuration","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Using RSA Keys (RS256)","slug":"using-rsa-keys-rs256","depth":2,"children":[]},{"title":"Benefits of RS256","slug":"benefits-of-rs256","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cocartheadlessllc/daea33fdda923178/analytics.js"],"subdomain":"cocartheadlessllc","siteName":"CoCart API","title":"Advanced Configuration for CoCart JWT Authentication","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"stable":{"href":"/getting-started/jwt/advanced-configuration","matchLevel":0},"pre-release":{"href":"/getting-started/jwt/advanced-configuration","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2025-10-12T23:16:46.902Z","originalFileLocation":"getting-started/jwt/advanced-configuration.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Take security to the next level with JWT Authentication.\">\u003cmeta data-mint-head name=\"keywords\" content=\"woocommerce, headless, api, rest api, cart, carts, ecommerce, wordpress, headless woocommerce, woocommerce cart, woocommerce carts, cocart, cocart api, cocart headless\">\u003cmeta data-mint-head name=\"application-name\" content=\"CoCart API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Advanced Configuration for CoCart JWT Authentication\">\u003cmeta data-mint-head property=\"og:description\" content=\"Take security to the next level with JWT Authentication.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"CoCart API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cocartheadlessllc.mintlify.site/_mintlify/api/og/v2?division=JWT+Authentication\u0026amp;title=Advanced+Configuration\u0026amp;description=Take+security+to+the+next+level+with+JWT+Authentication.\u0026amp;theme=69cc9454fed75362ebd90623\u0026amp;signature=e7e8d715fb8e80ca5c045a2b3ebe2eeab85996ce2be944d3760977a17f52831c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Advanced Configuration for CoCart JWT Authentication\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Take security to the next level with JWT Authentication.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cocartheadlessllc.mintlify.site/_mintlify/api/og/v2?division=JWT+Authentication\u0026amp;title=Advanced+Configuration\u0026amp;description=Take+security+to+the+next+level+with+JWT+Authentication.\u0026amp;theme=69cc9454fed75362ebd90623\u0026amp;signature=e7e8d715fb8e80ca5c045a2b3ebe2eeab85996ce2be944d3760977a17f52831c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cocartheadlessllc/Py2aEwXPfjd87AtY/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"CoCart API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6a42d7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/getting-started/jwt/advanced-configuration.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cocartapi.com/#organization\",\"name\":\"CoCart API\",\"url\":\"https://docs.cocartapi.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cocartheadlessllc/FOR-BxFAXTD5zZae/logo/light.svg?fit=max\u0026auto=format\u0026n=FOR-BxFAXTD5zZae\u0026q=85\u0026s=730b3e24b322cc10b648a7dc28525d15\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cocartapi.com#website\",\"name\":\"CoCart API\",\"url\":\"https://docs.cocartapi.com\",\"publisher\":{\"@id\":\"https://docs.cocartapi.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration#webpage\",\"url\":\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration\",\"name\":\"Advanced Configuration\",\"description\":\"Take security to the next level with JWT Authentication.\",\"dateModified\":\"2025-10-12T23:16:46.902Z\",\"isPartOf\":{\"@id\":\"https://docs.cocartapi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Getting Started\",\"item\":\"https://docs.cocartapi.com/getting-started/wordpress-setup\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JWT Authentication\",\"item\":\"https://docs.cocartapi.com/getting-started/jwt/setup\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Advanced Configuration\",\"item\":\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration#article\",\"headline\":\"Advanced Configuration\",\"name\":\"Advanced Configuration\",\"description\":\"Take security to the next level with JWT Authentication.\",\"url\":\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cocartapi.com/getting-started/jwt/advanced-configuration#webpage\"},\"dateModified\":\"2025-10-12T23:16:46.902Z\",\"publisher\":{\"@id\":\"https://docs.cocartapi.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cocartapi.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"CoCart API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"CoCart API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/getting-started/jwt/advanced-configuration.md","siteName":"CoCart API","nav":{"global":null,"versions":[{"version":"stable","default":true,"anchors":[{"anchor":"Documentation","icon":"book","tabs":[{"tab":"Home","icon":"compass","pages":[{"title":"Home","href":"/"}]},{"tab":"User Guides","icon":"book","groups":[{"group":"Overview","pages":[{"title":"CoCart: Decoupling WooCommerce for the modern storefront","sidebarTitle":"Introduction","icon":"hand-spock","href":"/overview/introduction"},{"title":"Frequently Asked Questions","icon":"question","href":"/overview/faq"},{"title":"Standards","icon":"clipboard","href":"/overview/standards"},{"title":"Roadmap","icon":"road","href":"/overview/roadmap"},{"title":"Security Policy","icon":"vault","href":"/overview/security-policy"}]},{"group":"Getting Started","pages":[{"title":"WordPress Setup","icon":"wordpress","tag":"WIP","href":"/getting-started/wordpress-setup"},{"group":"CoCart","icon":"cart-shopping","pages":[{"title":"Install CoCart","href":"/getting-started/core/setup"},{"title":"Quick Start","tag":"WIP","href":"/getting-started/core/quick-start"}]},{"group":"CoCart Plus","icon":"cart-plus","pages":[{"title":"Install CoCart Plus","href":"/getting-started/plus/setup"}]},{"group":"JWT Authentication","icon":"hashtag","pages":[{"title":"Setup","sidebarTitle":"Setup","href":"/getting-started/jwt/setup"},{"title":"Quick Start","sidebarTitle":"Quick Start","href":"/getting-started/jwt/quick-start"},{"title":"Core Concepts","description":"JSON Web Tokens are an open standard (RFC 7519) for securely transmitting information between parties as a JSON object.","href":"/getting-started/jwt/concepts"},{"title":"Advanced Configuration","href":"/getting-started/jwt/advanced-configuration"}]},{"title":"License Activation","description":"Enter your CoCart license key to activate your license.","icon":"key","tag":"WIP","href":"/getting-started/license-activation"}]},{"group":"Features","pages":[{"title":"Security","icon":"shield","href":"/documentation/security"},{"title":"Batch Requests for the Cart","sidebarTitle":"Batch Requests","icon":"layer-group","href":"/documentation/batch-requests"},{"title":"API Permissions","sidebarTitle":"Restrict access","icon":"user-lock","href":"/documentation/force-permissions"},{"title":"Rate Limiting","icon":"gauge-high","href":"/documentation/rate-limiting"},{"title":"CORS for CoCart","sidebarTitle":"CORS","icon":"door-open","href":"/documentation/cors"},{"title":"Load Cart","icon":"arrow-right-arrow-left","href":"/documentation/load-cart"}]},{"group":"Guides","pages":[{"title":"Guiding Principles","icon":"wrench","href":"/documentation/guides/guiding-principles"},{"title":"How to Update CoCart","sidebarTitle":"Updating CoCart","icon":"rotate","href":"/documentation/guides/updating-cocart"}]},{"group":"Developers","pages":[{"group":"Action hooks","icon":"tag","pages":[{"title":"Action hooks available in the core of CoCart","sidebarTitle":"In Core","tag":"WIP","href":"/documentation/developers/actions"},{"title":"Action hooks available in JWT Authentication","sidebarTitle":"In JWT","href":"/documentation/developers/jwt/actions"}]},{"group":"Filters","icon":"filter","pages":[{"title":"Filters available in the core of CoCart","sidebarTitle":"In Core","tag":"WIP","href":"/documentation/developers/filters"},{"title":"Filters available in JWT Authentication","sidebarTitle":"In JWT","href":"/documentation/developers/jwt/filters"}]},{"group":"Functions","icon":"robot","pages":[{"title":"Functions available in the core of CoCart","sidebarTitle":"In Core","href":"/documentation/developers/functions"}]},{"group":"Contributing","icon":"hand-holding-heart","pages":[{"title":"Contributing to CoCart","sidebarTitle":"Contributing","icon":"star","tag":"Updated","href":"/documentation/developers/contributing"},{"title":"Contributing to Documentation","sidebarTitle":"Documentation","icon":"book-sparkles","tag":"NEW","href":"/documentation/contributing-to-docs"}]}]},{"group":"Tools and Resources","pages":[{"title":"Tools","icon":"screwdriver-wrench","href":"/documentation/tools"},{"title":"Resources","icon":"tree","href":"/documentation/resources"},{"title":"WP-CLI for CoCart","sidebarTitle":"WP-CLI","icon":"terminal","href":"/documentation/wp-cli"}]},{"group":"Resources","pages":[{"title":"Community","icon":"bullhorn","href":"/resources/community"},{"title":"Support Policy","icon":"life-ring","url":"https://cocartapi.com/support-policy/","href":"/resources/support-policy"},{"title":"Opening Issues","icon":"scroll","href":"/resources/opening-issues"},{"title":"Backers","icon":"ticket","href":"/resources/backers"}]}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"CLI Reference","icon":"terminal","pages":[{"title":"CLI Reference","href":"/cli-reference/introduction"}]},{"tab":"Tutorials","icon":"graduation-cap","pages":[{"title":"Tutorials","href":"/tutorials/introduction"}]},{"tab":"Support Centre","icon":"question","pages":[{"title":"Support Centre","href":"/knowledge-base/contact-us"}]},{"tab":"What's New","icon":"clock-rotate-left","pages":[{"title":"What's New","href":"/updates/overview"}]}]},{"anchor":"Feature requests","icon":"bell-concierge","href":"https://cocartapi.com/suggest-a-feature/?ref=mintlify"},{"anchor":"Wall of Love","icon":"heart","href":"https://cocartapi.com/wall-of-love/?ref=mintlify"}]},{"version":"pre-release","anchors":[{"anchor":"Documentation","icon":"book","tabs":[{"tab":"Home","icon":"compass","pages":[{"title":"Home","href":"/"}]},{"tab":"User Guides","icon":"book","groups":[{"group":"Overview","pages":[{"title":"CoCart: Decoupling WooCommerce for the modern storefront","sidebarTitle":"Introduction","icon":"hand-spock","href":"/overview/pre-release/introduction"},{"title":"Frequently Asked Questions","icon":"question","href":"/overview/faq"},{"title":"Standards","icon":"clipboard","href":"/overview/standards"},{"title":"Roadmap","icon":"road","href":"/overview/roadmap"},{"title":"Security Policy","icon":"vault","href":"/overview/security-policy"}]},{"group":"Getting Started","pages":[{"title":"WordPress Setup","icon":"wordpress","tag":"WIP","href":"/getting-started/wordpress-setup"},{"group":"CoCart","icon":"cart-shopping","pages":[{"title":"Install CoCart","href":"/getting-started/core/setup"},{"title":"Quick Start","tag":"WIP","href":"/getting-started/core/quick-start"}]},{"group":"CoCart Plus","icon":"cart-plus","pages":[{"title":"Install CoCart Plus","href":"/getting-started/plus/setup"}]},{"group":"JWT Authentication","icon":"hashtag","pages":[{"title":"Setup","sidebarTitle":"Setup","href":"/getting-started/jwt/setup"},{"title":"Quick Start","sidebarTitle":"Quick Start","href":"/getting-started/jwt/quick-start"},{"title":"Core Concepts","description":"JSON Web Tokens are an open standard (RFC 7519) for securely transmitting information between parties as a JSON object.","href":"/getting-started/jwt/concepts"},{"title":"Advanced Configuration","href":"/getting-started/jwt/advanced-configuration"}]},{"title":"License Activation","description":"Enter your CoCart license key to activate your license.","icon":"key","tag":"WIP","href":"/getting-started/license-activation"}]},{"group":"Features","pages":[{"title":"Security","icon":"shield","href":"/documentation/security"},{"title":"Batch Requests","icon":"layer-group","tag":"Updated","href":"/documentation/pre-release/batch-requests"},{"title":"API Permissions","sidebarTitle":"Restrict access","icon":"user-lock","href":"/documentation/force-permissions"},{"title":"Auto Address","icon":"location-pin","tag":"New","href":"/documentation/pre-release/auto-address"},{"title":"Rate Limiting","icon":"gauge-high","tag":"Updated","href":"/documentation/pre-release/rate-limiting"},{"title":"CORS for CoCart","sidebarTitle":"CORS","icon":"globe","tag":"Updated","href":"/documentation/pre-release/cors"},{"title":"Load Cart","icon":"arrow-right-arrow-left","tag":"Updated","href":"/documentation/pre-release/load-cart"}]},{"group":"Guides","pages":[{"title":"Guiding Principles","icon":"wrench","href":"/documentation/guides/guiding-principles"},{"title":"How to Update CoCart","sidebarTitle":"Updating CoCart","icon":"rotate","href":"/documentation/guides/updating-cocart"}]},{"group":"Developers","pages":[{"group":"Action hooks","icon":"tag","pages":[{"title":"Action hooks available in the core of CoCart","sidebarTitle":"In Core","tag":"WIP","href":"/documentation/developers/pre-release/actions"},{"title":"Action hooks available in JWT Authentication","sidebarTitle":"In JWT","href":"/documentation/developers/jwt/actions"}]},{"group":"Filters","icon":"filter","pages":[{"title":"Filters available in the core of CoCart","sidebarTitle":"In Core","tag":"WIP","href":"/documentation/developers/pre-release/filters"},{"title":"Filters available in JWT Authentication","sidebarTitle":"In JWT","href":"/documentation/developers/jwt/filters"}]},{"group":"Functions","icon":"robot","pages":[{"title":"Functions available in the core of CoCart","sidebarTitle":"In Core","href":"/documentation/developers/pre-release/functions"}]},{"group":"Contributing","icon":"hand-holding-heart","pages":[{"title":"Contributing to CoCart","sidebarTitle":"Contributing","icon":"star","tag":"Updated","href":"/documentation/developers/contributing"},{"title":"Contributing to Documentation","sidebarTitle":"Documentation","icon":"book-sparkles","tag":"NEW","href":"/documentation/contributing-to-docs"}]}]},{"group":"Tools and Resources","pages":[{"title":"Tools","icon":"screwdriver-wrench","href":"/documentation/tools"},{"title":"Resources","icon":"tree","href":"/documentation/resources"},{"title":"WP-CLI for CoCart","sidebarTitle":"WP-CLI","icon":"terminal","href":"/documentation/wp-cli"}]},{"group":"Resources","pages":[{"title":"Community","icon":"bullhorn","href":"/resources/community"},{"title":"Support Policy","icon":"life-ring","url":"https://cocartapi.com/support-policy/","href":"/resources/support-policy"},{"title":"Opening Issues","icon":"scroll","href":"/resources/opening-issues"},{"title":"Backers","icon":"ticket","href":"/resources/backers"}]}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference/pre-release/introduction"}]},{"tab":"CLI Reference","icon":"terminal","pages":[{"title":"CLI Reference","href":"/cli-reference/introduction"}]},{"tab":"Tutorials","icon":"graduation-cap","pages":[{"title":"Tutorials","href":"/tutorials/introduction"}]},{"tab":"Support Centre","icon":"question","pages":[{"title":"Support Centre","href":"/knowledge-base/contact-us"}]},{"tab":"What's New","icon":"clock-rotate-left","pages":[{"title":"What's New","href":"/updates/overview"}]}]},{"anchor":"Feature requests","icon":"bell-concierge","href":"https://cocartapi.com/suggest-a-feature/?ref=mintlify"},{"anchor":"Wall of Love","icon":"heart","href":"https://cocartapi.com/wall-of-love/?ref=mintlify"}]}]},"basePath":"","title":"Advanced Configuration for CoCart JWT Authentication","deploymentId":"dpl_AYyV3CY85Zsy44WzfDVuMiAS7PWU","buildId":"dpl_AYyV3CY85Zsy44WzfDVuMiAS7PWU","dynamics":[],"chunks":[]}