Class: Booth::Credentials::Mode

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/booth/credentials/mode.rb

Instance Method Summary collapse

Constructor Details

#initialize(credential) ⇒ Mode

Returns a new instance of Mode.



6
7
8
# File 'lib/booth/credentials/mode.rb', line 6

def initialize(credential)
  @credential = credential
end

Instance Method Details

#otp_addable?Boolean

OTP

Returns:

  • (Boolean)


12
13
14
# File 'lib/booth/credentials/mode.rb', line 12

def otp_addable?
  ::Booth::Credentials::Modes::OtpAddable.call(credential)
end

#otp_changeable?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/booth/credentials/mode.rb', line 16

def otp_changeable?
  ::Booth::Credentials::Modes::OtpChangeable.call(credential)
end

#otp_manageable?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/booth/credentials/mode.rb', line 24

def otp_manageable?
  ::Booth::Credentials::Modes::OtpManageable.call(credential)
end

#otp_removable?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/booth/credentials/mode.rb', line 20

def otp_removable?
  ::Booth::Credentials::Modes::OtpRemovable.call(credential)
end

#password_addable?Boolean

Password

Returns:

  • (Boolean)


30
31
32
# File 'lib/booth/credentials/mode.rb', line 30

def password_addable?
  ::Booth::Credentials::Modes::PasswordAddable.call(credential)
end

#password_changeable?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/booth/credentials/mode.rb', line 34

def password_changeable?
  ::Booth::Credentials::Modes::PasswordChangeable.call(credential)
end

#password_manageable?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/booth/credentials/mode.rb', line 46

def password_manageable?
  ::Booth::Credentials::Modes::PasswordManageable.call(credential)
end

#password_removable?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/booth/credentials/mode.rb', line 38

def password_removable?
  ::Booth::Credentials::Modes::PasswordRemovable.call(credential)
end

#password_removal_requires_user_verifiable_webauth?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/booth/credentials/mode.rb', line 42

def password_removal_requires_user_verifiable_webauth?
  ::Booth::Credentials::Modes::PasswordRemovalRequiresUserVerifiableWebauth.call(credential)
end

#webauth_addable?Boolean

Webauth

Returns:

  • (Boolean)


52
53
54
# File 'lib/booth/credentials/mode.rb', line 52

def webauth_addable?
  ::Booth::Credentials::Modes::WebauthAddable.call(credential)
end

#webauth_manageable?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/booth/credentials/mode.rb', line 60

def webauth_manageable?
  ::Booth::Credentials::Modes::WebauthManageable.call(credential)
end

#webauth_removable?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/booth/credentials/mode.rb', line 56

def webauth_removable?
  ::Booth::Credentials::Modes::WebauthRemovable.call(credential)
end