Sha256: c15243a2d0c36b110b4b54ceab92ba5b0e629aae65521a69a90989a008434e29

Contents?: true

Size: 629 Bytes

Versions: 8

Compression:

Stored size: 629 Bytes

Contents

require 'casserver/authenticators/base'

# Dummy authenticator used for testing. 
# Accepts "testuser" for username and "testpassword" for password; otherwise authentication fails.
# Raises an AuthenticationError when username is "do_error" (this is useful to test the Exception
# handling functionality).
class CASServer::Authenticators::Test < CASServer::Authenticators::Base
  def validate(credentials)
    read_standard_credentials(credentials)
    
    raise CASServer::AuthenticatorError, "Username is 'do_error'!" if @username == 'do_error'
    
    return @username == "testuser" && @password == "testpassword"
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
relevance-rubycas-server-0.6.99 lib/casserver/authenticators/test.rb
rubycas-server-0.5.0 lib/casserver/authenticators/test.rb
rubycas-server-0.5.0.193 lib/casserver/authenticators/test.rb
rubycas-server-0.5.1 lib/casserver/authenticators/test.rb
rubycas-server-0.4.2 lib/casserver/authenticators/test.rb
rubycas-server-0.5.0.186 lib/casserver/authenticators/test.rb
rubycas-server-0.4.1 lib/casserver/authenticators/test.rb
rubycas-server-0.6.0 lib/casserver/authenticators/test.rb