-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use latest versions of development dependencies ruby-saml and nokogiri
- Loading branch information
1 parent
728fd8b
commit 68ff527
Showing
13 changed files
with
10 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# Ruby SAML Identity Provider (IdP) | ||
|
||
[](http://travis-ci.org/lawrencepit/ruby-saml-idp?branch=master) | ||
[](https://codeclimate.com/github/lawrencepit/ruby-saml-idp) | ||
[](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). | ||
|
@@ -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 | ||
----------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# encoding: utf-8 | ||
|
||
module SamlIdp | ||
module Controller | ||
require 'openssl' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
module SamlIdp | ||
module Default | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
module SamlIdp | ||
class Engine < Rails::Engine | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe SamlIdp::Controller do | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters