Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sdytr/loauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

loauth

Introduction

TBD

Installation

Just add it to your rebar.config deps:

  {deps, [
    ...
    {loauth, ".*",
      {git, "[email protected]:YOURNAME/loauth.git", "master"}}
      ]}.

And then do the usual:

    $ rebar get-deps
    $ rebar compile

Usage

Currently, only command-line usage (grant_type=password) is supported.

From the REPL:

> (loauth:start)
(#(inets ok) #(ssl ok) #(lhttpc ok))
> (slurp "src/loauth.lfe")
#(ok loauth)
> (set state
    (make-loauth-data
      token-uri "https://www.inaturalist.org/oauth/token"
      client-id your-client-id
      client-secret your-client-secret))
#(loauth-data undefined
  "https://www.inaturalist.org/oauth/token"
  ...)
> (set token (loauth:get-token your-username your-password state))
"2a58b2761cba0823c85f62ebd34b8f80e5c55cc342d287520fc3464acaa0c0d1"

About

A Simple OAuth Library for LFE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published