Class: SDM::MFAConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled: nil, okta: nil, provider: nil) ⇒ MFAConfig

Returns a new instance of MFAConfig.



10804
10805
10806
10807
10808
10809
10810
10811
10812
# File 'lib/models/porcelain.rb', line 10804

def initialize(
  enabled: nil,
  okta: nil,
  provider: nil
)
  @enabled = enabled == nil ? false : enabled
  @okta = okta == nil ? nil : okta
  @provider = provider == nil ? "" : provider
end

Instance Attribute Details

#enabledObject

Indicates if MFA is enabled for the organization.



10798
10799
10800
# File 'lib/models/porcelain.rb', line 10798

def enabled
  @enabled
end

#oktaObject

Okta MFA configuration. Future providers will be added to this wrapper.



10800
10801
10802
# File 'lib/models/porcelain.rb', line 10800

def okta
  @okta
end

#providerObject

The MFA provider, one of the MFAProvider constants.



10802
10803
10804
# File 'lib/models/porcelain.rb', line 10802

def provider
  @provider
end

Instance Method Details

#to_json(options = {}) ⇒ Object



10814
10815
10816
10817
10818
10819
10820
# File 'lib/models/porcelain.rb', line 10814

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end