Module: HasPassword

Extended by:
ActiveSupport::Concern
Included in:
PostfixAdmin::Admin, PostfixAdmin::Mailbox
Defined in:
lib/postfix_admin/models/concerns/has_password.rb

Instance Method Summary collapse

Instance Method Details

#scheme_prefixObject

example: CRAM-MD5, BLF-CRYPT, PLAIN return nil if no scheme prefix



8
9
10
11
12
13
14
15
# File 'lib/postfix_admin/models/concerns/has_password.rb', line 8

def scheme_prefix
  res = password&.match(/^\{.*?\}/)
  if res
    res[0]
  else
    nil
  end
end