File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed
lexik/jwt-authentication-bundle/2.3 Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ generate-jwt-keys :
2
+ ifeq (, $(shell which openssl) )
3
+ $(error "Unable to generate keys (needs OpenSSL)")
4
+ endif
5
+ mkdir -p etc/jwt
6
+ openssl genrsa -passout pass:${JWT_PASSPHRASE} -out ${JWT_PRIVATE_KEY_PATH} -aes256 4096
7
+ openssl rsa -passin pass:${JWT_PASSPHRASE} -pubout -in ${JWT_PRIVATE_KEY_PATH} -out ${JWT_PUBLIC_KEY_PATH}
8
+ @echo "\033[32mRSA key pair successfully generated\033[39m"
Original file line number Diff line number Diff line change
1
+ lexik_jwt_authentication :
2
+ private_key_path : " %env(JWT_PRIVATE_KEY_PATH)%"
3
+ public_key_path : " %env(JWT_PUBLIC_KEY_PATH)%"
4
+ pass_phrase : " %env(JWT_PASSPHRASE)%"
Original file line number Diff line number Diff line change
1
+ {
2
+ "bundles" : {
3
+ "Lexik\\ Bundle\\ JWTAuthenticationBundle\\ LexikJWTAuthenticationBundle" : [" all" ]
4
+ },
5
+ "copy-from-recipe" : {
6
+ "etc/" : " %ETC_DIR%"
7
+ },
8
+ "env" : {
9
+ "JWT_PRIVATE_KEY_PATH" : " %ETC_DIR%/jwt/private.pem" ,
10
+ "JWT_PUBLIC_KEY_PATH" : " %ETC_DIR%/jwt/public.pem" ,
11
+ "JWT_PASSPHRASE" : " %generate(secret)%"
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ <bg=blue;fg=white> </>
2
+ <bg=blue;fg=white> What's next? </>
3
+ <bg=blue;fg=white> </>
4
+
5
+ * <fg=blue>Execute</> the <comment>make generate-jwt-keys</> command to generate your key pair
6
+
7
+ * <fg=blue>Read</> the documentation at <comment>https://github.com/lexik/LexikJWTAuthenticationBundle#documentation</>
You can’t perform that action at this time.
0 commit comments