Module: OpenID

### Home Classes Methods

### In Files

- lib/openid/consumer.rb
- lib/openid/association.rb
- lib/openid/errors.rb
- lib/openid/constants.rb
- lib/openid/interface.rb

### Namespace

- CLASS OpenID::Association
- CLASS OpenID::AssociationManager
- CLASS OpenID::AuthenticationError
- CLASS OpenID::BaseAssociationManager
- CLASS OpenID::Consumer
- CLASS OpenID::ConsumerAssociation
- CLASS OpenID::DiffieHelmanAssociator
- CLASS OpenID::DumbAssociationManager
- CLASS OpenID::NoArgumentsError
- CLASS OpenID::NoOpenIDArgs
- CLASS OpenID::ProtocolError
- CLASS OpenID::Request
- CLASS OpenID::Response
- CLASS OpenID::ServerAssociation
- CLASS OpenID::SimpleHTTPClient
- CLASS OpenID::UserCancelled
- CLASS OpenID::UserSetupNeeded
- CLASS OpenID::ValueMismatchError

### Methods

- #error_page
- #normalize_url
- #quote_minimal
- #redirect
- #response_page

### Class/Module Index

Quicksearch

- OpenID
- OpenID::Association
- OpenID::AssociationManager
- OpenID::AuthenticationError
- OpenID::BaseAssociationManager
- OpenID::Consumer
- OpenID::ConsumerAssociation
- OpenID::DiffieHelmanAssociator
- OpenID::DumbAssociationManager
- OpenID::NoArgumentsError
- OpenID::NoOpenIDArgs
- OpenID::ProtocolError
- OpenID::Request
- OpenID::Response
- OpenID::ServerAssociation
- OpenID::SimpleHTTPClient
- OpenID::UserCancelled
- OpenID::UserSetupNeeded
- OpenID::ValueMismatchError
- String
- String::OpenID
- Bignum
- Crypto_math
- DateTime
- Fixnum

No matching classes.

# OpenID

### Constants

DEFAULT_DH_GEN
DEFAULT_DH_MODULUS
SECRET_SIZES

### Public Instance Methods

error_page(body) click to toggle source

Creates a response object signaling a plaintext error.

    # File lib/openid/interface.rb, line 20
    def error_page(body)
            return Response.new('code'=>400, 'content_type'=>'text/plain', 'body'=>body)
    end

normalize_url(url) click to toggle source

Strip whitespace off, and add http:// if http:// or https:// is not already present.

    # File lib/openid/consumer.rb, line 17
    def normalize_url(url)
            url.strip!
            if (!url.index(/^http:\/\/|^https:\/\//))
                    url = 'http://' + url
            end

            # TODO: Some unicode handling

            # (Keeping in mind that ruby's unicode/string distinction is kinda nil so far)

            return url
    end

quote_minimal(s) click to toggle source

    # File lib/openid/consumer.rb, line 11
    def quote_minimal(s)
            # TODO: implement? (Used by normalize_url's unicode handling in the python modules)

            return s
    end

redirect(url) click to toggle source

Creates a Response object signaling a redirect to url.

    # File lib/openid/interface.rb, line 12
    def redirect(url)
            return Response.new('code'=>302, 'redirect_url'=>url.to_s)
    end

response_page(body) click to toggle source

Creates a response object signaling a plaintext response.

    # File lib/openid/interface.rb, line 16
    def response_page(body)
            return Response.new('code'=>200, 'content_type'=>'text/plain', 'body'=>body)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.