Skip to content

Commit

Permalink
Use latest versions of development dependencies ruby-saml and nokogiri
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrencepit committed Mar 1, 2018
1 parent 728fd8b commit 68ff527
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 29 deletions.
2 changes: 1 addition & 1 deletion MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012 Lawrence Pit (http://lawrencepit.com)
Copyright (c) 2012 Lawrence Pit (https://github.com/lawrencepit/ruby-saml-idp)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Ruby SAML Identity Provider (IdP)

[![Build Status](https://secure.travis-ci.org/lawrencepit/ruby-saml-idp.png)](http://travis-ci.org/lawrencepit/ruby-saml-idp?branch=master)
[![Code Climate](https://codeclimate.com/github/lawrencepit/ruby-saml-idp/badges/gpa.svg)](https://codeclimate.com/github/lawrencepit/ruby-saml-idp)
[![Gem Version](https://fury-badge.herokuapp.com/rb/ruby-saml-idp.png)](http://badge.fury.io/rb/ruby-saml-idp)

The ruby SAML Identity Provider library is for implementing the server side of SAML authentication. It allows your application to act as an IdP (Identity Provider) using the [SAML v2.0](http://en.wikipedia.org/wiki/Security_Assertion_Markup_Language) protocol. It provides a means for managing authentication requests and confirmation responses for SPs (Service Providers).
Expand Down Expand Up @@ -94,12 +93,6 @@ Service Providers
To act as a Service Provider which generates SAML Requests and can react to SAML Responses use the excellent [ruby-saml](https://github.com/onelogin/ruby-saml) gem.


Author
----------

Lawrence Pit, [email protected], [lawrencepit.com](http://lawrencepit.com), [@lawrencepit](http://twitter.com/lawrencepit)


Copyright
-----------

Expand Down
1 change: 0 additions & 1 deletion app/controllers/saml_idp/idp_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
module SamlIdp
class IdpController < ActionController::Base
include SamlIdp::Controller
Expand Down
1 change: 0 additions & 1 deletion lib/ruby-saml-idp.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
module SamlIdp
require 'saml_idp/configurator'
require 'saml_idp/controller'
Expand Down
1 change: 0 additions & 1 deletion lib/saml_idp/configurator.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
module SamlIdp
class Configurator
attr_accessor :x509_certificate, :secret_key, :algorithm
Expand Down
2 changes: 0 additions & 2 deletions lib/saml_idp/controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

module SamlIdp
module Controller
require 'openssl'
Expand Down
1 change: 0 additions & 1 deletion lib/saml_idp/default.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
module SamlIdp
module Default

Expand Down
1 change: 0 additions & 1 deletion lib/saml_idp/engine.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
module SamlIdp
class Engine < Rails::Engine
end
Expand Down
3 changes: 1 addition & 2 deletions lib/saml_idp/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
module SamlIdp
VERSION = '0.3.4'
VERSION = '0.3.5'
end
9 changes: 4 additions & 5 deletions ruby-saml-idp.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "saml_idp/version"

Expand All @@ -12,7 +11,7 @@ Gem::Specification.new do |s|
s.summary = %q{SAML Indentity Provider in ruby}
s.description = %q{SAML IdP (Identity Provider) library in ruby}
s.license = "MIT"

s.date = Time.now.utc.strftime("%Y-%m-%d")
s.files = Dir.glob("app/**/*") + Dir.glob("lib/**/*") + [
"MIT-LICENSE",
Expand All @@ -24,10 +23,10 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.rdoc_options = ["--charset=UTF-8"]
s.add_development_dependency "rake"
s.add_development_dependency("nokogiri", "~> 1.6.8")
s.add_development_dependency("rake")
s.add_development_dependency("ruby-saml")
s.add_development_dependency("nokogiri")
s.add_development_dependency("rspec", "~> 3.0")
s.add_development_dependency("ruby-saml", "~> 0.8")
s.add_development_dependency("rails", "~> 3.2")
s.add_development_dependency("capybara", "~> 2.4.1")
end
Expand Down
8 changes: 3 additions & 5 deletions spec/saml_idp/controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
require 'spec_helper'

describe SamlIdp::Controller do
Expand All @@ -25,17 +24,16 @@ def params
saml_response = encode_SAMLResponse("[email protected]")
response = OneLogin::RubySaml::Response.new(saml_response)
expect(response.name_id).to eq("[email protected]")
expect(response.issuer).to eq("http://example.com")
expect(response.issuers).to eq(["http://example.com"])
response.settings = saml_settings
expect(response.is_valid?).to be true
expect(response.is_valid?).to be_truthy
end

it "should handle custom attribute objects" do
provider = double(to_s: %[<saml:AttributeStatement><saml:Attribute Name="organization"><saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Organization name</saml:AttributeValue></saml:Attribute></saml:AttributeStatement>])

default_attributes = %[<saml:AttributeStatement><saml:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"><saml:AttributeValue>[email protected]</saml:AttributeValue></saml:Attribute></saml:AttributeStatement>]


saml_response = encode_SAMLResponse("[email protected]", { attributes_provider: provider })
response = OneLogin::RubySaml::Response.new(saml_response)
expect(response.response).to include provider.to_s
Expand All @@ -48,7 +46,7 @@ def params
saml_response = encode_SAMLResponse("[email protected]")
response = OneLogin::RubySaml::Response.new(saml_response)
expect(response.name_id).to eq("[email protected]")
expect(response.issuer).to eq("http://example.com")
expect(response.issuers).to eq(["http://example.com"])
response.settings = saml_settings
expect(response.is_valid?).to be true
end
Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
$LOAD_PATH.unshift File.dirname(__FILE__)

Expand Down
2 changes: 1 addition & 1 deletion spec/support/saml_request_macros.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def make_saml_request(requested_saml_acs_url = "https://foo.example.com/saml/con
def saml_settings(options = {})
settings = OneLogin::RubySaml::Settings.new
settings.assertion_consumer_service_url = options[:saml_acs_url] || "https://foo.example.com/saml/consume"
settings.issuer = options[:issuer] || "http://example.com/issuer"
settings.issuer = options[:issuer] || "https://foo.example.com/"
settings.idp_sso_target_url = options[:idp_sso_target_url] || "http://idp.com/saml/idp"
settings.idp_cert_fingerprint = SamlIdp::Default::FINGERPRINT
settings.name_identifier_format = SamlIdp::Default::NAME_ID_FORMAT
Expand Down

0 comments on commit 68ff527

Please sign in to comment.