Git Product home page Git Product logo

movietime-server's Introduction

github.com/doorkeeper-gem/doorkeeper/wiki/Enable-Refresh-Token-Credentials github.com/doorkeeper-gem/doorkeeper/wiki/Using-Resource-Owner-Password-Credentials-flow

# Get client information from phone d = Doorkeeper::Application.last client_id = d.uid => ‘86243cce82a8ea74e78f4d9f83dd97b701bb58542f4ab1aa859fe0b4f95075ff’ client_secret = d.secret => ‘f9d09c922b38aa021e7059b7fbe5358e1c1f84233ff0bc7f5ebb5792fce9963f’

# Generate auth token based on username and password require ‘oauth2’ client = OAuth2::Client.new(‘86243cce82a8ea74e78f4d9f83dd97b701bb58542f4ab1aa859fe0b4f95075ff’, ‘f9d09c922b38aa021e7059b7fbe5358e1c1f84233ff0bc7f5ebb5792fce9963f’, site: ‘localhost:3000’) access_token = client.password.get_token(‘[email protected]’, ‘12345678’) puts access_token.token

http header: ‘Authorization’ => “bearer #{token}”

curl -H “Authorization: Bearer 78fdbce6ad4469a851c5d47ea69a1d390ea5b416ce5a3a2a9fc3379b438160e4” -X GET localhost:3000/payment_profiles curl -H “Authorization: Bearer 2c011180abae09025ada07a0952b7ff5af08d1167266129eafbe9bb3922ff9e2” -X GET localhost:3000/purchase_orders curl -H “Authorization: Bearer b67046dc860dd180db4b85a24b4268a7fde85fc0cffb4d01986bc6b34359d5b1” -X GET localhost:3000/users/me

# Trigger password reset curl -H “Content-Type: application/json” -H “Authorization: Bearer 54cd637cf3f7717592526b1e4f4c350cf4ceb2281230d2d191c7a2afab44ff5a” -X POST -d ‘{“user” : {“email”:“[email protected]”}}’ localhost:3000/users/password

curl -H “Authorization: Bearer 78fdbce6ad4469a851c5d47ea69a1d390ea5b416ce5a3a2a9fc3379b438160e4” -X GET www.movietime.us/brands curl -H “Authorization: Bearer 78fdbce6ad4469a851c5d47ea69a1d390ea5b416ce5a3a2a9fc3379b438160e4” -X GET www.movietime.us/purchase_orders.json

curl -H “Content-Type: application/json” -H “Authorization: Bearer a80cd5b2924f6fafa1d0c2f356e9596b8a8799e6e312184d40b0b43da3b84c6f” -X PUT -d ‘{“payment_profile”: {“default”: true}}’ localhost:3000/payment_profiles/72.json

curl -H “Content-Type: application/json” -H “Authorization: Bearer a80cd5b2924f6fafa1d0c2f356e9596b8a8799e6e312184d40b0b43da3b84c6f” -X POST -d ‘{“user”: {“ios_id”: ’2341234134324’}}‘ localhost:3000/registrations/temp | python -m json.tool

movietime-server's People

Watchers

Caleb Brown avatar James Cloos avatar wyefei avatar

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.