![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
A Ruby gem for getting a list of your Gmail contacts. Most of the code here has been extracted from mislav's contacts gem. It's been updated to work with Ruby 1.9 and Rails 3.
gem install gmail-contacts
Get a link to the authorization URL:
GmailContacts::Google.authentication_url("http://mysite.com/invites")
The user will be redirected to the URL you pass and a token
parameter will be sent along. Capture
that token and then request the contacts:
GmailContacts::Google.new("some_token").contacts
Every Contact
has a name and email fields:
GmailContacts::Google.new("some_token").contacts.each do |contact|
puts "#{contact.name}: #{contact.email}"
end
First create the authorization link in one of your views:
# app/views/invites/new.html.erb
<%= link_to "Invite your Gmail contacts", GmailContacts::Google.authentication_url("http://mysite.com/invites") %>
Then create a controller action that receives the token and fetches the contacts:
# config/routes.rb
match "/invites" => "invites#index"
# app/controllers/invites_controller.rb
class InvitesController
def index
token = params[:token]
@contacts = GmailContacts::Google.new("some_token").contacts
end
end
Finally, iterate through the contacts in your view:
# app/views/invites/index.html.erb
<% @contacts.each do |contact| %>
<span><strong><%= contact.name %></strong>: <% contact.email %></span>
<% end %>
FAQs
Unknown package
We found that gmail-contacts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.