diff --git a/lib/mozilla_iam/authenticator.rb b/lib/mozilla_iam/authenticator.rb index b32cce7..14dbcbf 100644 --- a/lib/mozilla_iam/authenticator.rb +++ b/lib/mozilla_iam/authenticator.rb @@ -1,5 +1,10 @@ module MozillaIAM class Authenticator < Auth::OAuth2Authenticator + + def enabled? + true + end + def after_authenticate(auth_token) begin id_token = auth_token[:credentials][:id_token] diff --git a/spec/components/mozilla_iam/authenticator_spec.rb b/spec/components/mozilla_iam/authenticator_spec.rb index 32d0ff3..dccac0d 100644 --- a/spec/components/mozilla_iam/authenticator_spec.rb +++ b/spec/components/mozilla_iam/authenticator_spec.rb @@ -1,6 +1,13 @@ require_relative '../../iam_helper' describe MozillaIAM::Authenticator do + + context "#enabled?" do + it "returns true" do + expect(described_class.new('auth0', trusted: true).enabled?).to be true + end + end + context '#after_authenticate' do it 'can authenticate a new user' do user = {