Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dump for 401 using NFAPI
[ec2-user@ip-172-29-253-60 ~]$ BEARER=$( \
> curl \
> --request POST \
> -v \
> --show-error \
> --header 'content-type: application/json' \
"client_id":"uDIsF0HDktO4Eqtr1ivpekDIIJQRspVZ",
> --data '{
> "client_id":"uDIsF0HDktO4Eqtr1ivpekDIIJQRspVZ",
> "client_secret": "lBfRsn2CjYhGUlCl3DFPt0XVUR3IlBa6EFvywDOh4bC0cA4KG8qma",
> "audience":"https://gateway.production.netfoundry.io/",
> "grant_type":"client_credentials"
> }' \
> https://netfoundry-production.auth0.com/oauth/token |\
> jq -r .access_token \
> ) && echo $BEARER
Note: Unnecessary use of -X or --request, POST is already inferred.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 54.186.97.80...
* TCP_NODELAY set
* Connected to netfoundry-production.auth0.com (54.186.97.80) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
} [5 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [98 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [4830 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=*.auth0.com
* start date: Jul 23 00:00:00 2019 GMT
* expire date: Aug 23 12:00:00 2020 GMT
* subjectAltName: host "netfoundry-production.auth0.com" matched cert's "*.auth0.com"
* issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x128cb90)
} [5 bytes data]
> POST /oauth/token HTTP/2
> Host: netfoundry-production.auth0.com
> User-Agent: curl/7.61.1
> Accept: */*
> content-type: application/json
> Content-Length: 260
>
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
} [5 bytes data]
* We are completely uploaded and fine
{ [5 bytes data]
< HTTP/2 401
< date: Tue, 05 May 2020 23:39:43 GMT
< content-type: application/json
< content-length: 60
< server: nginx
< ot-tracer-spanid: 281f98cd6e2416a4
< ot-tracer-traceid: 6d939c4a2a8b8107
< ot-tracer-sampled: true
< ot-baggage-auth0-request-id: 44667c17bb0d6176ce06fc0c
< x-auth0-requestid: 07948344401261e0533b
< set-cookie: did=s%3Av0%3Ab21eb750-8f29-11ea-826a-9f5cdde81fb7.Hwn4xDJtMvo6gm28ey76UmXpdIwFe8m6UVm4upKjywk; Max-Age=31557600; Path=/; Expires=Thu, 06 May 2021 05:39:43 GMT; HttpOnly; Secure; SameSite=None
< set-cookie: did_compat=s%3Av0%3Ab21eb750-8f29-11ea-826a-9f5cdde81fb7.Hwn4xDJtMvo6gm28ey76UmXpdIwFe8m6UVm4upKjywk; Max-Age=31557600; Path=/; Expires=Thu, 06 May 2021 05:39:43 GMT; HttpOnly; Secure
< x-ratelimit-limit: 1000000
< x-ratelimit-remaining: 999999
< x-ratelimit-reset: 1588721984
< cache-control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-transform
<
{ [60 bytes data]
100 320 100 60 100 260 159 689 --:--:-- --:--:-- --:--:-- 848
* Connection #0 to host netfoundry-production.auth0.com left intact
null
[ec2-user@ip-172-29-253-60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.