[Bash] Get value from the response
The from get value Bash response
2023-09-14 09:00:45 时间
curl http://127.0.0.1:10080/login -u user
It prints out the token.
{"token":"eyJhbGciOwefewwefwIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20iLCJleHAiOjE2NTM2NzYzMjYsImlhdCI6MTY1MzQxNzEyNiwiaXNzIjoiYXV0aC5zZXJ2aWNlIiwic3ViIjoidXNlciJ9.G7C077LbtoL_FJF3s6wv1iMVGAiU-5zXWYpeJOnMDSY"}
You can copy and paste the long token in to the next command manually, but copying long, wrapped lines in cloud shell is broken. To work around this, you can either copy the JWT token in pieces, or - more easily - by assigning the token to a shell variable as follows
On shell 2 - login and assign the value of the JWT to a variable
TOKEN=$(curl http://127.0.0.1:10080/login -u user | jq -r '.token')
Check that it worked:
echo $TOKEN
相关文章
- React Error: Failed at the xxx@0.1.0 start script 'react-scripts start'.
- 【已解决】spring boot项目从mysql中获取数据候错误The driver has not received any packets from the server
- PAT (Top Level) Practice 1017 The Best Peak Shape (35 分) 题解
- Error fetching command 'build_solr_schema': The 'solr' backend requires the installation of 'pysolr'
- 【错误记录】Android Studio 编译报错 ( The project is using an incompatible version (AGP 7.4.2) of the Androi )
- ORA-28085: The input and output lengths of the redaction do not match. ORACLE 报错 故障修复 远程处理
- ORA-29348: You must specify the datafiles to be plugged in ORACLE 报错 故障修复 远程处理
- ORA-29874: warning in the execution of ODCIINDEXALTER routine ORACLE 报错 故障修复 远程处理
- ORA-29909: label for the ancillary operator is not a literal number ORACLE 报错 故障修复 远程处理
- ORA-31691: The worker received message number string from the MCP, which is invalid. ORACLE 报错 故障修复 远程处理
- ORA-32481: cycle value for CYCLE clause must be different from the non-cycle value ORACLE 报错 故障修复 远程处理
- ORA-46015: The value of the “paramDatatype” element is too long. ORACLE 报错 故障修复 远程处理
- ORA-48439: The input path name exceeds the maximum length [string] ORACLE 报错 故障修复 远程处理
- ORA-48487: The internal predicate string exceeds the maximum length [string] ORACLE 报错 故障修复 远程处理
- ORA-55487: VPD constraints exist for the equivalent property ORACLE 报错 故障修复 远程处理
- ORA-02324: more than one column in the SELECT list of THE subquery ORACLE 报错 故障修复 远程处理
- ORA-06579: Bind variable not big enough to hold the output value ORACLE 报错 故障修复 远程处理
- ORA-08190: restore point string is from a different incarnation of the database ORACLE 报错 故障修复 远程处理
- ORA-13712: Cannot perform ADDM analysis on AWR snapshots from previous releases. Snapshot version “string” do not match the database version “string”. ORACLE 报错 故障修复 远程处理
- ORA-13904: The file has been dropped and recreated during the procedure call. ORACLE 报错 故障修复 远程处理
- ORA-14262: new subpartition name must differ from the old subpartition name ORACLE 报错 故障修复 远程处理
- ORA-14634: Subpartition descriptions cannot be specified during the SPLIT/MERGE of a partition of a Range-List partitioned table ORACLE 报错 故障修复 远程处理
- ORA-15251: only restricted mount is allowed in the ASM instance ORACLE 报错 故障修复 远程处理
- tomcat启动时出现There are no resources that can be added or removed from the server详解编程语言
- MySQL Database: Master the Basics with call Function(callmysql)
- 界面上的文字表达技巧(The Language of the Interface)
- Linux: Powering the World from the Shadows(linuxexists)
- Exploring the Fascinating World of Linux MIME: A Comprehensive Guide(linuxmime)
- Mastering the Oracle Function Syntax: A Comprehensive Guide.(oracle函数语法)