Giter Site home page Giter Site logo

emacs-oauth's Introduction

emacs-oauth - An OAuth library in elisp

This is oauth client library implementation in elisp. It is capable of authenticating (receiving an access token) and signing requests. Currently it only supports HMAC-SHA1, although adding additional signature methods should be relatively straight forward.

Visit http://oauth.net/core/1.0 for the complete oauth spec.

Oauth requires the client application to receive user authorization in order to access restricted content on behalf of the user. This allows for authenticated communication without jeopardizing the user's password. In order for an application to use oauth it needs a key and secret issued by the service provider.

Usage:

Obtain access token:

The easiest way to obtain an access token is to call (oauth-authorize-app) This will authorize the application and return an oauth-access-token. You will use this token for all subsequent requests. In many cases it will make sense to serialize this token and reuse it for future sessions. At this time, that functionality is left to the application developers to implement (see yammer.el for an example of token serialization).

Two helper functions are provided to handle authenticated requests: (oauth-fetch-url) and (oauth-post-url) Both take the access-token and a url. Post takes an additional parameter post-vars-alist which is a list of key val pairs to be used in a x-www-form-urlencoded message.

yammer.el: http://github.com/psanford/emacs-yammer/tree/master is an example mode that uses oauth.el

Dependencies:

The default behavior of oauth.el is to dispatch to curl for http communication. It is strongly recommended that you use curl. If curl is unavailable you can set oauth-use-curl to nil and oauth.el will try to use the emacs internal http functions (url-request). Note: if you plan on doing https and have oauth-use-curl set to nil, make sure you have gnutls-bin installed.

oauth.el uses hmac-sha1 library for generating signatures. An implementation by Derek Upham is included for convenience.

This library assumes that you are using the oauth_verifier method described in the 1.0a spec.

emacs-oauth's People

Contributors

psanford avatar

Watchers

 avatar  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.