module Utils::GoogleHelpers

Direct including types

Defined in:

controllers/utilities/google-helpers.cr

Constant Summary

ADMIN_ACCOUNT = ENV["GOOGLE_ADMIN_ACCOUNT"]? || "[email protected]"
DIRECTORY_DOMAIN = ENV["GOOGLE_DIRECTORY_DOMAIN"]? || "example.com"
ENC_PRIVATE_KEY = ENV["GOOGLE_PRIVATE_KEY"]? || "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpQcm9jLVR5cGU6IDQsRU5DUllQVEVECkRFSy1JbmZvOiBERVMtRURFMy1DQkMsNUFFQzI5NEMyMUNGRTAwQwoKb0JXTUVKTlJUU3hHdWRpUFc1ODMwcnlrb1JaSzNEZnVSZ0hUOXdnL0RjMjR0ZW13eTNkMWRhNEZ3akg0d0RWYgp2dEdzWm14WFIwbFZCUFdLeHdacGh2Z0ZTRTM4dnl2VHduKyt3VHRFaWc2ZFBVTFE3VHRmclU5WDIxcG5MTmNBCk9jZytBQ0lONVNmZXRlSk0xWjBPOXMvN2FPN0ZLa0toNWI0Z0dwTEhrTWhiaGpnTng2ZStFWGwxOVBoaEkvSFoKdVlXQXVwWjNvOHhjUlVnMHIzWUNJaTRUdmlnRjJ4a2FDWURTMy9BUk9ZMlZzUU9Zc2R4SGZiaFo3Zm1tMzNvbgpSOC9WU0J3b2lkUEsxSWc3QUtvZEZQMlBkVDdibjg3YUM2MDBIN3gwclcwZ0ZodWlpMFNSc1ErWVBianVNcFRQCjBSVWZKSjNNSzN4anBzYmZwRW55VDlFcHZhZ2kweFBVYnY5TjNiQWVIdmU3U3ZqRlBVMnJyUkpONklMYmVkczgKN21udFo0VU9SZGhYeWJjZTJveTVsYjBvbnY5dFAyUitlTUw2SGdvcXlpMGJ1SjBsWnVnSEVKdUpYTlZOOXpJLwpGMjRoUU9nQlhQKzY1QzJxaUl5T3VoR2RjbVE4TlRNd2FsSkxzcFgrV2hKUkE2c2ViNUx0alJsamlIUWxvdHAwCnBqMGJsSm1kZ2lJVms2ckVhaEZwS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k3SDMwVHFVNkVZcHRFMUlpc0NLeU1WMDhNRkdoakUxbkYKbFlUdjdPd1gveWRZQ3ZpUlJXcHNGa2ZsUjEyOXQ1anI3YTA3NmZubVdONWZoMUFYL2hUb3czdFhZa1p6d3VtZwpnQXJpR0tNSDY4WnNzd1ZLOWZEOFVGdE5WRGd2T1p0a1l0bkdKVXBYd1ByUGR1ZkM5RlB0ZW9HQ0lhVVR6VnpmCjVDemV1RGx5QWhiZHZjYTRaTURlOGxGK0ZsR2lWWk9lOWU5RDNWbDlGVk5KU3dmNU41VlRWTkxEOUwvMWZkQm0KZnFhS0YzSzlUWE9BTk1ZYldySWhweFN5TlpPSXJxTHgzWjdFWmdxZjUxVmtrOWhtQ2VnNDNCQVNRSEFOdnU0TgotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQ=="

Private key base64 encoded

GOOGLE_SCOPES = ENV["GOOGLE_SCOPES"]? || "https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/admin.directory.user.readonly"
ISSUER = ENV["GOOGLE_ISSUER"]? || "[email protected]"
PRIVATE_KEY = String.new(Base64.decode(ENC_PRIVATE_KEY))

Instance Method Summary

Instance Method Detail

def calendar_for(sub = ADMIN_ACCOUNT) #

[View source]
def google_directory(user_token : String, view_type = "admin_view") #

[View source]
def google_directory #

[View source]