module Lono::Configset::Strategy::Helpers::Dsl::Auth
Public Instance Methods
authentication(data=nil, force: false)
click to toggle source
# File lib/lono/configset/strategy/helpers/dsl/auth.rb, line 3 def authentication(data=nil, force: false) if data.nil? authentication_reader else authentication_setter(data, force) end end
authentication_reader()
click to toggle source
data can be either:
1. logical id - String 2. Full AWS::CloudFormation::Authentication value structure
# File lib/lono/configset/strategy/helpers/dsl/auth.rb, line 16 def authentication_reader # AWS::CloudFormation::Authentication case @authentication when String logical_id = @authentication { rolebased: { type: "S3", buckets: [lono_bucket_name], roleName: {Ref: logical_id}, # currently ref meth is not available } } when Hash @authentication end end
authentication_setter(data, force=false)
click to toggle source
# File lib/lono/configset/strategy/helpers/dsl/auth.rb, line 33 def authentication_setter(data, force=false) @authentication = data unless @authentication || force end