Method: Puppet::Provider::Auth0ClientGrant::Auth0ClientGrant#get

Defined in:
lib/puppet/provider/auth0_client_grant/auth0_client_grant.rb

#get(context) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/puppet/provider/auth0_client_grant/auth0_client_grant.rb', line 7

def get(context)
  client_grants(context).map do |data|
    res = get_client_puppet_resource_identifier_by_id(context,data['client_id'])
    aud = data['audience']
    if res
      {
        title: "#{res} -> #{aud}",
        ensure: 'present',
        client_resource: res,
        audience: aud,
        scopes: data['scope']&.sort,
        client_id: data['client_id'],
      }
    else
    end
  end
end