module GcpIapWarden::Utils

Constants

GOOGLE_VALUE_PREFIX

Public Class Methods

parse_google_value(str) click to toggle source

returns value of google headers prefixed with `accounts.google.com:` example:

parse_google_value("accounts.google.com:example@gmail.com")
=> example@gmail.com
# File lib/gcp_iap_warden/utils.rb, line 10
def self.parse_google_value(str)
  str.sub(GOOGLE_VALUE_PREFIX, "") if str&.start_with?(GOOGLE_VALUE_PREFIX)
end