Codemirror - color a line based in a tag - codemirror

We've a file with a log file style log4j
[ main] [DEBUG] (14:25:46.832 CET) server started
[ main] [ INFO] (14:25:46.832 CET) I'm a nice info line
[ main] [ERROR] (14:25:46.832 CET) wrong user password for user '..'
Each line depending on if it's a DEBUG, INFO or ERROR should be colored in a different way (the whole line)
How this be done with Codemirror ?

Using the defineSimpleMode is straight forward using a regular expression :
CodeMirror.defineSimpleMode("log4j",
{
start: [
{regex: /.*\[FATAL\].*/, token: "log4j-fatal"},
{regex: /.*\[ERROR\].*/, token: "log4j-error"},
{regex: /.*\[ WARN\].*/, token: "log4j-warn"},
{regex: /.*\[ INFO\].*/, token: "log4j-info"},
{regex: /.*\[DEBUG\].*/, token: "log4j-debug"},
{regex: /.*\[TRACE\].*/, token: "log4j-trace"},
],
});

Related

Swift Autofill Password not working: "failed to approve"

I want to implement Password Autofill but I do not get it working. It fails with the following error:
Error Domain=NSOSStatusErrorDomain Code=-25293 ""beezleapp.com" failed to approve "N4EV3W64CV.com.beezleapp.beezle"" UserInfo={numberOfErrorsDeep=0, NSDescription="beezleapp.com" failed to approve "N4EV3W64CV.com.beezleapp.beezle"}
For this code:
SecAddSharedWebCredential(
"beezleapp.com" as CFString,
emailPw.email as CFString,
pw
)
This are my associated domains:
Bundle identifier:
Team ID:
This is my AASA file:
{
"applinks": {
"details": [
{
"appID": "N4EV3W64CV.com.beezleapp.beezle",
"paths": ["*"]
}
]
},
"webcredentials":{
"apps":[
"N4EV3W64CV.com.beezleapp.beezle"
]
},
"appclips":{
}
}
It is available at:
$ curl https://beezleapp.com/.well-known/apple-app-site-association
$ curl https://beezleapp.com/apple-app-site-association
What am I missing?
Turned out it was a DNS caching issue on the device side. I turned on Associated Domains Development in Settings -> Developer. Then it worked instantly.

Sale cannot be executed in Kadena Pact Marmalde

Errors occur in the following conditions.
Running on local server (ubuntu on windows).
I deployed these files.
Token is minted.
The yaml file is generated via Django.
The generated file is then used to run the API request formatter to generate Json.
Template:
code:
(marmalade.ledger.sale
(read-msg 'token-id)
(read-msg 'account)
(read-decimal 'amount)
(read-integer 'timeout)
)
data:
token-id: "${token_id}"
account: "${account}"
amount: ${amount}
timeout: ${timeout}
quote:
price: "${price}"
recipient-guard:
keys:
[ "${recipient_key}", ]
recipient: ${recipient}
keyPairs:
- public: ${marmalade_pub}
secret: ${marmalade_sec}
caps:
- name: "marmalade.ledger.SALE"
args: ["${token_id}", "${account}", ${amount}, ${timeout}]
Generated Fileļ¼š
code:
(marmalade.ledger.sale
(read-msg 'token-id)
(read-msg 'account)
(read-decimal 'amount)
(read-integer 'timeout)
)
data:
token-id: "92496e13-4414-4c58-aceb-0c7d77120af2"
account: "a0fc037522ae0202052775f773e3cf823e3bd7640a12e80694b2dd76"
amount: 1.0
timeout: 100
quote:
price: "1.0"
recipient-guard:
keys:
[ "52d9d996e6cc77f48a1ff1b734224a2ce6cee3af84c3f6e1720047645e9c2c31", ]
recipient: a0fc037522ae0202052775f773e3cf823e3bd7640a12e80694b2dd76
keyPairs:
- public: b63680e667576818b713d5d398ad395610b522fbc53e08afe46a719a0a128fb5
secret: 4242d66fac539660702ce4f9c01a39bb16f1d6b6c7110c6647010cb4dd041dd8
caps:
- name: "marmalade.ledger.SALE"
args: ["92496e13-4414-4c58-aceb-0c7d77120af2", "a0fc037522ae0202052775f773e3cf823e3bd7640a12e80694b2dd76", 1.0, 100]
JSON:
b'{"cmds":[{"hash":"cD5gqQVmRj08xqOdqfKwLLL2eb76_j_eZDdzV4Xdkjg","sigs":[{"sig":"2fb4bbb496271a138c33a4c8b94cf4511c8ad494b5c0cca94a2d1f98a37025e865b1414116fe77e841fbe71c6430e
5da72209123a63e958b992f4e8ba1770103"}],"cmd":"{\\"networkId\\":null,\\"payload\\":{\\"exec\\":{\\"data\\":{\\"amount\\":1.0,\\"token-id\\":\\"92496e13-4414-4c58-aceb-0c7d7712
0af2\\",\\"account\\":\\"a0fc037522ae0202052775f773e3cf823e3bd7640a12e80694b2dd76\\",\\"quote\\":{\\"recipient-guard\\":{\\"keys\\":[\\"52d9d996e6cc77f48a1ff1b734224a2ce6cee3
af84c3f6e1720047645e9c2c31\\"]},\\"price\\":\\"1.0\\",\\"recipient\\":\\"a0fc037522ae0202052775f773e3cf823e3bd7640a12e80694b2dd76\\"},\\"timeout\\":100},\\"code\\":\\"(marmal
ade.ledger.sale (read-msg \'token-id) (read-msg \'account) (read-decimal
\'amount) (read-integer \'timeout)
)\\"}},\\"signers\\":[{\\"pubKey\\":\\"b63680e667576818b713d5d398a
d395610b522fbc53e08afe46a719a0a128fb5\\",\\"clist\\":[{\\"args\\":[\\"92496e13-4414-4c58-aceb-0c7d77120af2\\",\\"a0fc037522ae0202052775f773e3cf823e3bd7640a12e80694b2dd76\\",1
,100],\\"name\\":\\"marmalade.ledger.SALE\\"}]}],\\"meta\\":{\\"creationTime\\":0,\\"ttl\\":0,\\"gasLimit\\":0,\\"chainId\\":\\"\\",\\"gasPrice\\":0,\\"sender\\":\\"\\"},\\"n
once\\":\\"2022-07-20 09:53:05.975872 UTC\\"}"}]}\n'
The following error occurred when I posted the Json data to request.post on 'localhost:8080/api/v1/poll'.
{'cD5gqQVmRj08xqOdqfKwLLL2eb76_j_eZDdzV4Xdkjg': {'gas': 0, 'result': {'status': 'failure', 'error': {'callStack': [], 'type': 'EvalError', 'message': 'Managed capability not installed: (marmalade.ledger.OFFER "92496e13-4414-4c58-aceb-0c7d77120af2" "a0fc037522ae0202052775f773e3cf823e3bd7640a12e80694b2dd76" 1.0 100)', 'info': ''}}, 'reqKey': 'cD5gqQVmRj08xqOdqfKwLLL2eb76_j_eZDdzV4Xdkjg', 'logs': None, 'metaData': None,
'continuation': None, 'txId': None}}
How do I get these to work properly?
P.S. I am Japanese and not an English speaker. I used a translation site to ask this question. Sorry if the description is missing.

Using the AzureRM Powershell module to get info about on prem files and folders backup

I feel like I must be doing something terribly, terribly wrong. Either that or the documentation on these cmdlets aren't clear enough for me.
What I'm trying to accomplish: I want to use PS to query Azure about the status of our on premise files and folders backups.
I have no issues with logging into the account or any trouble with getting a list of our vaults. The problems start when I set the vault context and try to get information about the backup jobs. The commands that I run:
Login-AzureRmAccount
$Vault = Get-AzureRmRecoveryServicesVault -Name VaultName
Set-AzureRmRecoveryServicesVaultContext -Vault $Vault
Get-AzureRmRecoveryServicesBackupJob -BackupManagementType MARS
The last command returns nothing at all. However, if I enable -Debug on it, it will show all the information I'm interested in under the HTTP RESPONSE header. None of this information is returned, the debugger states that "Number of jobs fetched: 0" and I get nothing.
Full debug output:
DEBUG: 08:44:46 - GetAzureRmRecoveryServicesBackupJob begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 08:44:49 - using account id 'ACCOUNT'...
DEBUG: Inside Restore. Going to create ResourceClient.
DEBUG: [Common.Authentication]: Authenticating using Account: 'ACCOUNT', environment: 'AzureCloud', tenant: 'c2b9e5a3-3e84-41a4-9bb0-9ad0bfc0d078'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/
Resource: https://management.core.windows.net/
ClientId: CLIENT-ID
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: 42.1826836416667 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: 6f4Gz6d8ZDrYUvYCBBJYPmTnIndSq/HrCDh/o4NT0lk=
Refresh Token Hash: hF89CiReJHwVRutZTWzsVTGSrcO6vmk+GTYU1Q/jxQQ=
Expiration Time: 02/22/2018 08:27:00 +00:00
User Hash: dt37+xi+2YPdIjxWZVMf7Xx5vD6t7he78R4CLmJoH78=
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: - TokenCache: Serializing token cache with 2 items.
DEBUG: Client Created successfully
DEBUG: Filters provided are: StartTime - EndTime - Status - Operation - Type - MARS
DEBUG: [Common.Authentication]: Authenticating using Account: 'ACCOUNT', environment: 'AzureCloud', tenant: 'c2b9e5a3-3e84-41a4-9bb0-9ad0bfc0d078'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/c2b9e5a3-3e84-41a4-9bb0-9ad0bfc0d078/
Resource: https://management.core.windows.net/
ClientId: CLIENT-ID
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: 42.18256378 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: 6f4Gz6d8ZDrYUvYCBBJYPmTnIndSq/HrCDh/o4NT0lk=
Refresh Token Hash: hF89CiReJHwVRutZTWzsVTGSrcO6vmk+GTYU1Q/jxQQ=
Expiration Time: 02/22/2018 08:27:00 +00:00
User Hash: dt37+xi+2YPdIjxWZVMf7Xx5vD6t7he78R4CLmJoH78=
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: - TokenCache: Serializing token cache with 2 items.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/c2b9e5a3-3e84-41a4-9bb0-9ad0bfc0d078/
Resource: https://management.core.windows.net/
ClientId: CLIENT-ID
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: 42.1825471016667 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: TOKEN - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: 6f4Gz6d8ZDrYUvYCBBJYPmTnIndSq/HrCDh/o4NT0lk=
Refresh Token Hash: hF89CiReJHwVRutZTWzsVTGSrcO6vmk+GTYU1Q/jxQQ=
Expiration Time: 02/22/2018 08:27:00 +00:00
User Hash: dt37+xi+2YPdIjxWZVMf7Xx5vD6t7he78R4CLmJoH78=
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 02/22/2018 07:44:49: - TokenCache: Serializing token cache with 2 items.
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/Subscriptions/SUB-ID/resourceGroups/RSV_West-Europe/providers/Microsoft.RecoveryServices/vaults/VAULTNAME/backupJobs?$filter=operation eq '' and startTime eq '2018-02-21 07:44:49 AM' and endTime eq '20
18-02-22 07:44:49 AM'&api-version=2017-07-01
Headers:
x-ms-client-request-id : 5bce331b-e74a-4b23-a41a-8dff4f7dd890
accept-language : en-US
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Pragma : no-cache
x-ms-request-id : fa17789f-af7f-44eb-99c7-8d3dfca6d676
x-ms-client-request-id : f0a8eed2-febe-4ca6-b748-d6dc9f2b2b00-PS,f0a8eed2-febe-4ca6-b748-d6dc9f2b2b00-PS
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
Server : Microsoft-IIS/8.0,Microsoft-IIS/8.0
X-Powered-By : ASP.NET
X-Content-Type-Options : nosniff
x-ms-ratelimit-remaining-subscription-reads: 14998
x-ms-correlation-request-id : fa17789f-af7f-44eb-99c7-8d3dfca6d676
x-ms-routing-request-id : WESTEUROPE:20180222T072714Z:fa17789f-af7f-44eb-99c7-8d3dfca6d676
Date : Thu, 22 Feb 2018 07:27:13 GMT
Body:
{
"value": [
{
"id": "/Subscriptions/SUB-ID/resourceGroups/RSV_West-Europe/providers/Microsoft.RecoveryServices/vaults/VAULTNAME/backupJobs/JOB-ID",
"name": "JOB-ID",
"type": "Microsoft.RecoveryServices/vaults/backupJobs",
"properties": {
"jobType": "MabJob",
"duration": "PT24M50.092S",
"mabServerName": "SERVERNAME",
"mabServerType": "MABContainer",
"workloadType": "FileFolder",
"errorDetails": [
{
"errorString": "The operation completed successfully (0x0) ",
"recommendations": []
}
],
"entityFriendlyName": "SERVERNAME",
"backupManagementType": "MAB",
"operation": "Backup",
"status": "Completed",
"startTime": "2018-02-21T21:00:26.99Z",
"endTime": "2018-02-21T21:25:17.082Z",
"activityId": "ACTIVITY-ID"
}
}
]
}
DEBUG: Ignoring some of the unexpected job while conversion
DEBUG: Number of jobs fetched: 0
DEBUG: AzureQoSEvent: CommandName - Get-AzureRmRecoveryServicesBackupJob; IsSuccess - True; Duration - 00:00:07.4996067; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 08:27:15 - GetAzureRmRecoveryServicesBackupJob end processing.
DEBUG: 08:27:15 - GetAzureRmRecoveryServicesBackupJob end processing.
Am I missing something or are the cmdlets not compatible with fetching information about on prem backups? The latter would feel odd since the information is obviously stored and accessible in our portal, even returned in the debug information.

Illegal character in query at index 40: facebook

Sorry, I am reformulating the question; I was so frustrated by this Error that I posted the question in a snap.
I am trying to use camel-facebook component and using very simple route that figures as such in the blueprint.xml file:
from uri="facebook://me?oAuthAppId={{oAuthAppId}}&oAuthAppSecret={{oAuthAppSecret}}&oAuthAccessToken={{oAuthAccessToken}}&consumer.delay=86400000"/>
I am using :
Red Hat JBoss Developer Studio
Version: 10.1.0.GA
Actually I see the bundle started :
[ 348] [Active ] [Created ] [ ] [ 80] MyApp [fbdemo] (1.0.0.SNAPSHOT)
Also :
[ 333] [Active ] [ ] [ ] [ 50] camel-facebook (2.17.0.redhat-630187)
Perhaps I have the error mentioned above, I put XXXXXXXXX for oAuth*.
2017-02-14 16:02:16,128 | ERROR | 68)-192.168.56.1 | BlueprintCamelContext | 234 - org.apache.camel.camel-blueprint - 2.17.0.redhat-630187 | Error occurred during starting Camel: CamelContext(blueprintContext) due Failed to create route fbRoute: Route(fbRoute)[[From[facebook://me?oAuthAppId={{oAuthAppId}}... because of Failed to resolve endpoint: facebook://me?oAuthAppId=XXXXXXXXXXXXXX
&oAuthAppSecret=XXXXXXXXXXXXXXXXXXXXXX&oAuthAccessToken=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&consumer.delay=86400000 due to: Illegal character in query at index 40: facebook://me?oAuthAppId=XXXXXXXXXXXXXXXXXXXXXXX
&oAuthAppSecret=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&oAuthAccessToken=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&consumer.delay=86400000
org.apache.camel.FailedToCreateRouteException: Failed to create route fbRoute: Route(fbRoute)[[From[facebook://me?oAuthAppId={{oAuthAppId}}... because of Failed to resolve endpoint: facebook://me?oAuthAppId=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
&oAuthAppSecret=XXXXXXXXXXXXXXXXXXXXXXXXXXXX&oAuthAccessToken=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&consumer.delay=86400000 due to: Illegal character in query at index 40: facebook://me?oAuthAppId=XXXXXXXXXXXXXXXX
Shall the oAuthAccessToken be the Application AccesToken or User AccessToken that I get from Facebook Graph Explorer. Note that I don`t have any special character in code secret only a | ( pipe) in case the AccessToken is the Appli AccessToken not User AccessToken. How to figure the index 40.
Thank you very much
If you are using xml then you need to check that all "&" symbols are encoded as "&" so it will looks like:
<from url="facebook://me?oAuthAppId=XXXXXXXXXXXXX&oAuthAppSecret=XXXXXXXXXXXXXXXXXXXXXXXXX&oAuthAccessToken=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&consumer.delay=86400000" />

Orion context broker global instance token

I want to publish some data on the Orion context broker global instance and I have requested a token as referred at Quick start guide. When I continue coding (java client) next day I got:
Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException: Unexpected end of file from server
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509)
at publishers.fiware.OrionClient.getEntities(OrionClient.java:23)
at FiwareTest.main(FiwareTest.java:11)
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:792)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:789)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:253)
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)
... 6 more
So I requested a new token and worked again.
A token generated that way has an expiration time? How much?
Do I have a way to get a non expiring token?
According with OpenStack Keystone default configuration, tokens expires after 1 hour:
http://docs.openstack.org/juno/config-reference/content/section_keystone.conf.html
# Amount of time a token should remain valid (in seconds).
# (integer value)
#expiration=3600
You can renew it by getting another one:
http://developer.openstack.org/api-ref/identity/v3/index.html?expanded=#token-authentication-with-unscoped-authorization
POST /v3/auth/tokens HTTP/1.1
Host: test.ttcloud.net:5001
Content-Type: application/json
X-Auth-Token: {{user-token}}
{
"auth": {
"identity": {
"methods": [
"token"
],
"token": {
"id": "{{user-token}}"
}
}
}
}