GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — oauth_timestamp missing or invalid (suggestion for improvement with code) · Issue #1067 · scribejava/scribejava

oauth_timestamp missing or invalid (suggestion for improvement with code) #1067

New issue
Copy link
New issue
Copy link
Open
Open
oauth_timestamp missing or invalid (suggestion for improvement with code)#1067
Copy link

Description

@fabst2w
fabst2w
opened on Mar 17, 2024
Issue body actions

According to https://oauth.net/core/1.0a/#nonce

[...] the timestamp is expressed in the number of seconds since January 1, 1970 00:00:00 GMT [...]

The current implementation of com.github.scribejava.core.services.TimestampServiceImpl.Timer.getMilis() returns System.currentTimeMillis();.
I think that this fulfills the specification only when the application runs in GMT time zone.

My application is running in Germany. And for a requests to a server my application got the answer "oauth_timestamp missing or invalid".
In the API docs there is a hint that "[...] requests where the timestamp differs more than 10 minutes from the current UTC time will fail."

Changing the implementation of com.github.scribejava.core.services.TimestampServiceImpl.Timer.getMilis() to return Instant.now().getEpochSecond()*1000L; works fine.
So I think that this should be the general implementation to have an oauth_timestamp independently from the system's time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.