Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
# Ruby OpenID Library Installation

## Rubygems Installation
## Install as a gem

Rubygems is a tool for installing ruby libraries and their
dependancies. If you have rubygems installed, simply:
`ruby-openid` is distributed on [RubyGems](https://rubygems.org/).
Install it:

gem install ruby-openid

This is probably what you need.

## Manual Installation

Unpack the archive and run setup.rb to install:
Unpack the archive and run `setup.rb` to install:

ruby setup.rb

setup.rb installs the library into your system ruby. If don't want to
`setup.rb` installs the library into your system ruby. If don't want to
add openid to you system ruby, you may instead add the `lib` directory of
the extracted tarball to your RUBYLIB environment variable:
the extracted tarball to your `RUBYLIB` environment variable:

$ export RUBYLIB=${RUBYLIB}:/path/to/ruby-openid/lib

Expand All @@ -27,21 +29,13 @@ Make sure everything installed ok:
irb$> require "openid"
=> true

Or, if you installed via rubygems:

$> irb
irb$> require "rubygems"
=> true
irb$> require_gem "ruby-openid"
=> true

## Run the test suite

Go into the test directory and execute the `runtests.rb` script.

## Next steps

* Run `consumer.rb` in the examples directory.
* Get started writing your own consumer using OpenID::Consumer
* Run `consumer.rb` in the `examples/` directory.
* Get started writing your own consumer using `OpenID::Consumer`
* Write your own server with `OpenID::Server`
* Use the `OpenIDLoginGenerator`! Read `example/README` for more info.
* Use the `OpenIDLoginGenerator`! Read `examples/README.md` for more info.
17 changes: 11 additions & 6 deletions examples/README → examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,35 @@ OpenID library. Make sure you have properly installed the library
before running the examples. These examples are a great place to
start in integrating OpenID into your application.

==Rails example
## Rails example

The rails_openid contains a fully functional OpenID server and relying
The `rails_openid` directory contains a fully functional OpenID server and relying
party, and acts as a starting point for implementing your own
production rails server. You'll need the latest version of Ruby on
Rails installed, and then:

cd rails_openid
./script/server
```shell
cd rails_openid
./script/server
```

Open a web browser to http://localhost:3000/ and follow the instructions.

The relevant code to work from when writing your Rails OpenID Relying
Party is:

rails_openid/app/controllers/consumer_controller.rb

If you are working on an OpenID provider, check out

rails_openid/app/controllers/server_controller.rb

Since the library and examples are Apache-licensed, don't be shy about
copy-and-paste.

==Rails ActiveRecord OpenIDStore plugin
## Rails ActiveRecord OpenIDStore plugin

For various reasons you may want or need to deploy your ruby openid
consumer/server using an SQL based store. The active_record_openid_store
consumer/server using an SQL based store. The `active_record_openid_store`
is a plugin that makes using an SQL based store simple. Follow the
README inside the plugin's dir for usage.