lib/osso/models/identity_provider.rb in osso-0.0.11 vs lib/osso/models/identity_provider.rb in osso-0.1.0
- old
+ new
@@ -16,11 +16,11 @@
PEM_HEADER = "-----BEGIN CERTIFICATE-----\n"
PEM_FOOTER = "\n-----END CERTIFICATE-----"
ENTITY_ID_URI_REQUIRED = [
'PING',
- ]
+ ].freeze
def name
service.titlecase
end
@@ -28,11 +28,11 @@
{
domain: domain,
idp_sso_target_url: sso_url,
idp_cert: sso_cert,
issuer: sso_issuer,
- name_identifier_format: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
+ name_identifier_format: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
}
end
def assertion_consumer_service_url
[
@@ -54,10 +54,10 @@
self.status = 'configured' if sso_url && sso_cert && pending?
end
def set_sso_issuer
parts = [domain, oauth_client_id]
-
+
parts.unshift('https:/') if ENTITY_ID_URI_REQUIRED.any?(service)
self.sso_issuer = parts.join('/')
end