Trying to introspect but getting a 404


#1

I’m following the https://www.ory.sh/docs/guides/master/hydra/1-tutorial/ tut, but using the REST API

I create a client,
from the logs:
time=“2018-10-09T02:28:07Z” level=info msg=“started handling request” method=POST remote=“10.233.74.128:55329” request=/clients
time=“2018-10-09T02:28:07Z” level=info msg=“completed handling request” measure#http://localhost:4444.latency=92892161 method=POST remote=“10.233.74.128:55329”

I get a token
from the logs:
request=/clients status=201 text_status=Created took=92.892161ms
time=“2018-10-09T02:29:09Z” level=info msg=“started handling request” method=POST remote=“10.233.74.128:55582” request=/oauth2/token
time=“2018-10-09T02:29:09Z” level=info msg=“completed handling request” measure#http://localhost:4444.latency=96651274 method=POST remote=“10.233.74.128:55582” request=/oauth2/token status=200 text_status=OK took=96.651274ms

But when I want to introspect the token I get a 404
from the logs
time=“2018-10-09T02:29:39Z” level=info msg=“started handling request” method=POST remote=“10.233.74.128:55707” request=/oauth2/introspect
time=“2018-10-09T02:29:39Z” level=info msg=“completed handling request” measure#http://localhost:4444.latency=371120 method=POST remote=“10.233.74.128:55707” request=/oauth2/introspect status=404 text_status=“Not Found” took=“371.12µs”

Any ideas?


#2

It’s http://localhost:4445/oauth2/introspect, not http://localhost:4444/oauth2/introspect. From docs:

docker exec -it hydra_hydra_1 \
    hydra token introspect \
    --endpoint http://localhost:4445 \
    --client-id my-client \
    --client-secret secret \
    UDYMha9TwsMBejEvKfnDOXkhgkLsnmUNYVQDklT5bD8.ZNpuNRC85erbIYDjPqhMwTinlvQmNTk_UvttcLQxFJY