Sha256: fb9bef23911605a0528cf3a34f0af4e633fedba15b4bad934d0c6c951217c5cf
Contents?: true
Size: 867 Bytes
Versions: 6
Compression:
Stored size: 867 Bytes
Contents
module CASServer module Authenticators class Base attr_accessor :options attr_reader :username # make this accessible so that we can pick up any # transformations done within the authenticator def validate(credentials) raise NotImplementedError, "This method must be implemented by a class extending #{self.class}" end def configure(options) raise ArgumentError, "options must be a HashWithIndifferentAccess" unless options.kind_of? HashWithIndifferentAccess @options = options.dup end protected def read_standard_credentials(credentials) @username = credentials[:username] @password = credentials[:password] @service = credentials[:service] end end end class AuthenticatorError < Exception end end
Version data entries
6 entries across 6 versions & 1 rubygems