mirror of
https://github.com/symfony/recipes.git
synced 2026-09-17 18:16:34 +03:00
49 lines
2.1 KiB
JSON
49 lines
2.1 KiB
JSON
{
|
|
"manifests": {
|
|
"lexik/jwt-authentication-bundle": {
|
|
"manifest": {
|
|
"bundles": {
|
|
"Lexik\\Bundle\\JWTAuthenticationBundle\\LexikJWTAuthenticationBundle": [
|
|
"all"
|
|
]
|
|
},
|
|
"copy-from-recipe": {
|
|
"etc/": "%ETC_DIR%"
|
|
},
|
|
"env": {
|
|
"JWT_PRIVATE_KEY_PATH": "%ETC_DIR%/jwt/private.pem",
|
|
"JWT_PUBLIC_KEY_PATH": "%ETC_DIR%/jwt/public.pem",
|
|
"JWT_PASSPHRASE": "%generate(secret)%"
|
|
},
|
|
"makefile": [
|
|
"generate-jwt-keys:",
|
|
"ifeq (, $(shell which openssl))",
|
|
"$(error \"Unable to generate keys (needs OpenSSL)\")",
|
|
"endif",
|
|
"\tmkdir -p etc/jwt",
|
|
"\topenssl genrsa -passout pass:${JWT_PASSPHRASE} -out ${JWT_PRIVATE_KEY_PATH} -aes256 4096",
|
|
"\topenssl rsa -passin pass:${JWT_PASSPHRASE} -pubout -in ${JWT_PRIVATE_KEY_PATH} -out ${JWT_PUBLIC_KEY_PATH}",
|
|
"\t@echo \"\\033[32mRSA key pair successfully generated\\033[39m\""
|
|
],
|
|
"post-install-output": [
|
|
"<bg=blue;fg=white> Next for LexikJWTAuthenticationBundle </>",
|
|
" Run <comment>make generate-jwt-keys</> to generate a key pair."
|
|
]
|
|
},
|
|
"files": {
|
|
"etc/packages/lexik_jwt_authentication.yaml": {
|
|
"contents": [
|
|
"lexik_jwt_authentication:",
|
|
" private_key_path: \"%env(JWT_PRIVATE_KEY_PATH)%\"",
|
|
" public_key_path: \"%env(JWT_PUBLIC_KEY_PATH)%\"",
|
|
" pass_phrase: \"%env(JWT_PASSPHRASE)%\"",
|
|
""
|
|
],
|
|
"executable": false
|
|
}
|
|
},
|
|
"ref": "76daa85b5a5c640baef13028b0bf0bb07788fd34"
|
|
}
|
|
}
|
|
}
|