1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-26 20:54:21 +01:00
fab-manager/app/models/o_auth2_provider.rb
Sylvain 70803ee41b (api) validate auth providers data
+ remove legacy code
2022-05-04 12:27:48 +02:00

15 lines
379 B
Ruby

# frozen_string_literal: true
# OAuth2Provider is a special type of AuthProvider which provides authentication through an external SSO server using
# the oAuth 2.0 protocol.
class OAuth2Provider < ApplicationRecord
has_one :auth_provider, as: :providable
validates_with OAuth2ProviderValidator
def domain
URI(base_url).scheme + '://' + URI(base_url).host
end
end