class Maestrano::SSO::BaseGroup

Attributes

company_name[R]
country[R]
free_trial_end_at[R]
local_id[RW]
uid[R]

Public Class Methods

new(saml_response) click to toggle source

Initializer @param Maestrano::SAML::Response

# File lib/maestrano/sso/base_group.rb, line 9
def initialize(saml_response)
  att = saml_response.attributes
  @uid = att['group_uid']
  @country = att['country']
  @free_trial_end_at = Time.iso8601(att['group_end_free_trial'])
  @company_name = att['company_name']
end

Public Instance Methods

to_hash() click to toggle source
# File lib/maestrano/sso/base_group.rb, line 17
def to_hash
  {
    provider: 'maestrano',
    uid: self.uid,
    info: {
      free_trial_end_at: self.free_trial_end_at,
      company_name: self.company_name,
      country: self.country,
    },
    extra: {}
  }
end