Coder Social home page Coder Social logo

Comments (3)

Trishia avatar Trishia commented on August 25, 2024

Used access token

{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImxfcUtMNlE3djFRNTNyZ3dSSFN1aiJ9.eyJpc3MiOiJodHRwczovL3R0YW9jZi51cy5hdXRoMC5jb20vIiwic3ViIjoiZ29vZ2xlLW9hdXRoMnwxMDQ0MzAyMzI5NjAyMzA1ODY1OTUiLCJhdWQiOiJodHRwczovL3d3dy50dGFvY2ZjbG91ZC5vcmciLCJpYXQiOjE2MzA5MDk4MjMsImV4cCI6MTYzMDk5NjIyMywiYXpwIjoieXhGOXJQQ3B0OFRrcVJEbmpYZ1NPa0YxR3dFUVVaYVoiLCJzY29wZSI6InI6ZGV2aWNlaW5mb3JtYXRpb246KiByOnJlc291cmNlczoqIHc6cmVzb3VyY2VzOiogdzpzdWJzY3JpcHRpb25zOiogb2ZmbGluZV9hY2Nlc3MifQ.YlNhADKs1NZfzpT2KdD5kB1qZgvIfYtXclWSIjZkbjNE1zzgBqGNirWTRMGSigH6mvl7ZnuyEh0ul4xy414bPVXWCQ2brNFPvNoSAzRIF5BV38UgTdblxmexp5B7S_B8Y6JhYKZX4GaKzjkgAX1pMGcKKovb9UwKlQ1xg9BuuIRsdnTq-eBekz42rCndh-JUzp2AElgDGF3sRf_0DvPJR0i3TXBXXoD7WoezhyavcVJWwhIcOa5wIMQFgPng9N86iCMOQNtDn4DTHitpwmVGOphOJNq2_F6fqx2zSO6JJ7hnTtK5yPnD0tD2_e8epT3NrqgO4ocb_4Ypy-CTPWdBbA","expires_in":"86400","scope":"r:deviceinformation:* r:resources:* w:resources:* w:subscriptions:* offline_access","state":"xUCu7QmRVvgPQ4C1uJcjVG7owOuXSRL9dfLSTfrVK_A=","token_type":"Bearer"}

JWT Payload data

{
  "iss": "https://ttaocf.us.auth0.com/",
  "sub": "google-oauth2|104430232960230586595",
  "aud": "https://www.ttaocfcloud.org",
  "iat": 1630909823,
  "exp": 1630996223,
  "azp": "yxF9rPCpt8TkqRDnjXgSOkF1GwEQUZaZ",
  "scope": "r:deviceinformation:* r:resources:* w:resources:* w:subscriptions:* offline_access"
}

from hub.

Trishia avatar Trishia commented on August 25, 2024

The logs of real expired access token of cloud2cloud-gateway are below:

2021-09-09T09:29:32.142Z        DEBUG   log/log.go:102  GET /api/v1/devices
2021-09-09T09:29:32.629Z        ERROR   log/log.go:117  cannot process request on /api/v1/devices: invalid token: could not parse token: token is expired
github.com/plgd-dev/kit/log.Errorf
        /go/pkg/mod/github.com/plgd-dev/[email protected]/log/log.go:117
github.com/plgd-dev/cloud/cloud2cloud-gateway/service.logAndWriteErrorResponse
        /go/src/github.com/plgd-dev/cloud/cloud2cloud-gateway/service/httpApi.go:52
github.com/plgd-dev/cloud/cloud2cloud-gateway/service.NewHTTP.func1
        /go/src/github.com/plgd-dev/cloud/cloud2cloud-gateway/service/httpApi.go:214
github.com/plgd-dev/cloud/pkg/net/http.CreateAuthMiddleware.func1.1
        /go/src/github.com/plgd-dev/cloud/pkg/net/http/auth.go:78
net/http.HandlerFunc.ServeHTTP
        /usr/local/go/src/net/http/server.go:2069
github.com/plgd-dev/cloud/cloud2cloud-gateway/service.loggingMiddleware.func1
        /go/src/github.com/plgd-dev/cloud/cloud2cloud-gateway/service/httpApi.go:172
net/http.HandlerFunc.ServeHTTP
        /usr/local/go/src/net/http/server.go:2069
github.com/gorilla/mux.(*Router).ServeHTTP
        /go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210
net/http.serverHandler.ServeHTTP
        /usr/local/go/src/net/http/server.go:2887
net/http.(*conn).serve
        /usr/local/go/src/net/http/server.go:1952

The error message rpc error: code = Unauthenticated desc = invalid token: could not parse token: token is expired of unexpired access token is different from the result of expired access token.

What is problem of rpc call ?

from hub.

Trishia avatar Trishia commented on August 25, 2024

It seems to be solved in plgd/hub latest version so I will close this issue now.

from hub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.