Sha256: 93064cb22440c69e354e60a5c667f154cfe17f1352542747e31cb4b662e26c7a
Contents?: true
Size: 637 Bytes
Versions: 7
Compression:
Stored size: 637 Bytes
Contents
module OpenIDConnect module Discovery class Principal class URI < Principal def initialize(identifier) uri = normalize(identifier) @identifier = uri.to_s @host = uri.host @port = uri.port unless [80, 443].include?(uri.port) end private def normalize(identifier) identifier = "https://#{identifier}" unless identifier.include?('://') uri = ::URI.parse(identifier) uri.fragment = nil uri rescue ::URI::Error => e raise InvalidIdentifier.new('Invalid URI') end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems