Class: PostgresPR::Authentification

### Home Classes Methods

### In Files

- lib/postgres-pr/message.rb

### Parent

PostgresPR::Message

### Methods

- ::create
- ::register_auth_type
- #dump
- #message__dump
- #parse

### Files

- 1q

### Class/Module Index

Quicksearch

- PostgresPR
- PostgresPR::Authentification
- PostgresPR::AuthentificationClearTextPassword
- PostgresPR::AuthentificationCryptPassword
- PostgresPR::AuthentificationKerberosV4
- PostgresPR::AuthentificationKerberosV5
- PostgresPR::AuthentificationMD5Password
- PostgresPR::AuthentificationOk
- PostgresPR::AuthentificationSCMCredential
- PostgresPR::BackendKeyData
- PostgresPR::CommandComplete
- PostgresPR::Connection
- PostgresPR::Connection::Result
- PostgresPR::CopyInResponse
- PostgresPR::CopyOutResponse
- PostgresPR::DataRow
- PostgresPR::DumpError
- PostgresPR::EmptyQueryResponse
- PostgresPR::ErrorResponse
- PostgresPR::Message
- PostgresPR::NoticeErrorMixin
- PostgresPR::NoticeResponse
- PostgresPR::ParameterStatus
- PostgresPR::Parse
- PostgresPR::ParseComplete
- PostgresPR::ParseError
- PostgresPR::PasswordMessage
- PostgresPR::Query
- PostgresPR::ReadyForQuery
- PostgresPR::RowDescription
- PostgresPR::RowDescription::FieldInfo
- PostgresPR::SSLRequest
- PostgresPR::SaltedAuthentificationMixin
- PostgresPR::StartupMessage
- PostgresPR::Terminate
- PostgresPR::UnknownAuthType
- PostgresPR::UnknownMessageType
- Buffer
- Buffer::EOF
- Buffer::Error
- Postgres
- Postgres::Conversion
- Postgres::Conversion::ConversionError
- BinaryReaderMixin
- BinaryWriterMixin
- ByteOrder
- IO
- PGError
- PGconn
- PGresult
- TC_Conversion

No matching classes.

# PostgresPR::Authentification

### Constants

AuthTypeMap

### Public Class Methods

create(buffer) click to toggle source

    # File lib/postgres-pr/message.rb, line 111
    def self.create(buffer)
      buffer.position = 5
      authtype = buffer.read_int32_network
      klass = AuthTypeMap[authtype]
      obj = klass.allocate
      obj.parse(buffer)
      obj
    end

register_auth_type(type) click to toggle source

    # File lib/postgres-pr/message.rb, line 120
    def self.register_auth_type(type)
      raise "duplicate auth type registration" if AuthTypeMap.has_key?(type)
      AuthTypeMap[type] = self
      self.const_set(:AuthType, type)
      class_eval "def auth_type() AuthType end"
    end

### Public Instance Methods

dump() click to toggle source

    # File lib/postgres-pr/message.rb, line 130
    def dump
      super(4) do |buffer|
        buffer.write_int32_network(self.auth_type)
      end
    end

Also aliased as: message__dump
message__dump() click to toggle source

the dump method of class Message

Alias for: dump
parse(buffer) click to toggle source

    # File lib/postgres-pr/message.rb, line 136
    def parse(buffer)
      super do
        auth_t = buffer.read_int32_network
        raise ParseError unless auth_t == self.auth_type
        yield if block_given?
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.