class Vcsmap::Plugin::FacebookClientSecrets
Public Class Methods
new()
click to toggle source
# File lib/vcsmap/plugins/facebook_client_secrets.rb, line 4 def initialize @search_string = 'filename:fb_client_secrets.json+app_secret' @app_id_regex = /(?:\"|')app_id(?:\"|')\:(?:\ |)(?:\"|')(.*?)(?:\"|')/i @app_secret_regex = /(?:\"|')app_secret(?:\"|')\:(?:\ |)(?:\"|')(.*?)(?:\"|')/i end
Public Instance Methods
credentials(file)
click to toggle source
# File lib/vcsmap/plugins/facebook_client_secrets.rb, line 10 def credentials(file) @app_id = capture_match(@app_id_regex, file) @app_secret = capture_match(@app_secret_regex, file) ['oAuth', @app_id, @app_secret] rescue NoMethodError [] end
table_header()
click to toggle source
# File lib/vcsmap/plugins/facebook_client_secrets.rb, line 18 def table_header %w(Protocol app_id app_secret) end