Skip to content

Commit

Permalink
updated with UUID-type ID's
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Pedersen committed Jul 29, 2010
1 parent c1f089c commit c17f89b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions example/app/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ def Account.get_saml_settings
# should retrieve SAML-settings based on subdomain, IP-address, NameID or similar
settings = Onelogin::Saml::Settings.new

settings.assertion_consumer_service_url = "http://localhost:3008/sessions/complete"
settings.assertion_consumer_service_url = "http://localhost:3000/sessions/complete"
settings.issuer = "mysaasapp.com" # the name of your application
settings.idp_sso_target_url = "http://app.localhost:3000/saml/signon/3763"
settings.idp_cert_fingerprint = "90:CC:16:F0:8D:A6:D1:C6:BB:27:2D:BA:93:80:1A:1F:16:8E:4E:08"
settings.idp_sso_target_url = "https://app.onelogin.com/saml/signon/8216"
settings.idp_cert_fingerprint = "90:CC:16:F1:...."
settings.name_identifier_format = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"

settings
Expand Down
7 changes: 2 additions & 5 deletions lib/onelogin/saml/authrequest.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require "base64"
require "uuid"

module Onelogin::Saml
class Authrequest
Expand All @@ -24,11 +25,7 @@ def create(settings)
private

def self.generateUniqueID(length)
chars = ("a".."f").to_a + ("0".."9").to_a
chars_len = chars.size
uniqueID = ""
1.upto(length) { |i| uniqueID << chars[rand(chars_len-1)] }
uniqueID
UUID.new.generate
end

def self.getTimestamp
Expand Down
5 changes: 2 additions & 3 deletions ruby-saml.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

Gem::Specification.new do |s|
s.name = %q{ruby-saml}
s.version = "0.0.3"
s.version = "0.0.4"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["OneLogin LLC"]
s.date = %q{2010-07-22}
s.date = %q{2010-07-29}
s.description = %q{SAML toolkit for Ruby on Rails}
s.email = %q{[email protected]}
s.extra_rdoc_files = [
Expand Down Expand Up @@ -82,7 +82,6 @@ Gem::Specification.new do |s|
"lib/onelogin/saml/settings.rb",
"lib/ruby-saml.rb",
"lib/xml_sec.rb",
"license.txt",
"ruby-saml.gemspec",
"test/ruby-saml_test.rb",
"test/test_helper.rb"
Expand Down

0 comments on commit c17f89b

Please sign in to comment.