Compare commits

...

8 Commits

Author SHA1 Message Date
Tommy Parnell
b2094b9c4f bump version 2016-07-03 14:13:04 -04:00
Jack Tench
e51b69cf8f Allow custom scopes for Salesforce (#168)
* Pass list of scopes to Saleforce authorization endpoint to allow for customisation of scopes via existing configuration option.

* SalesforceAuthenticationHandler ensure Options.Scope not null
2016-07-03 10:42:27 -07:00
Tommy Parnell
c083049ce3 revert changes to the build for now 2016-07-03 13:42:35 -04:00
Tommy Parnell
d7947f010a Revert "if else yo"
This reverts commit d761e6c904.
2016-07-03 13:36:18 -04:00
Tommy Parnell
bc4767f479 Revert "fix publish syntax"
This reverts commit a5af6f4886.
2016-07-03 13:36:16 -04:00
Tommy Parnell
fb60718771 Revert "minor build bug"
This reverts commit b0825b8339.
2016-07-03 13:36:15 -04:00
Tommy Parnell
c596c7787c Revert "build things"
This reverts commit 1625f787d2.
2016-07-03 13:36:12 -04:00
Tommy Parnell
1625f787d2 build things 2016-07-02 13:25:30 -07:00
4 changed files with 36 additions and 17 deletions

26
Gemfile.lock Normal file
View File

@@ -0,0 +1,26 @@
GEM
remote: http://rubygems.org/
specs:
albacore (2.0.4)
map (~> 6.5)
nokogiri (~> 1.5)
rake (> 10)
semver2 (~> 3.4)
map (6.6.0)
mini_portile2 (2.0.0)
nokogiri (1.6.7.2-x64-mingw32)
mini_portile2 (~> 2.0.0.rc2)
os (0.9.6)
rake (11.1.1)
semver2 (3.4.2)
PLATFORMS
x64-mingw32
DEPENDENCIES
albacore
nokogiri
os
BUNDLED WITH
1.12.1

View File

@@ -15,8 +15,7 @@ PACKAGES = File.expand_path("packages")
TOOLS = File.expand_path("tools")
NUGET = File.expand_path("#{TOOLS}/nuget")
NUGET_EXE = File.expand_path("#{TOOLS}/nuget/nuget.exe")
@version = ENV['APPVEYOR_REPO_TAG_NAME'] || '0.0.1-alpha1'
@version = @version.sub "v", ""
@version = "2.7.0"
PROJECTS = Dir.glob('src/*').select{|dir| File.directory? dir }
desc 'Retrieve things'
@@ -64,18 +63,10 @@ end
desc 'publish nugets'
task :nuspec_publish do
nugetKey = ENV['APPVEYOR_REPO_TAG']
if nugetKey != 'true' || nugetKey != true;
puts 'not publishing since APPVEYOR_REPO_TAG has not been set. Please add a github tag'
else
PROJECTS.each{|dir|
Dir.chdir(dir) do
sh "#{NUGET_EXE} push #{FileList["*.nupkg"].first} -ApiKey #{nugetKey}"
sh "#{NUGET_EXE} push #{FileList["*.nupkg"].first}"
end
}
sh "#{NUGET_EXE} push #{FileList["*.nupkg"].first} -ApiKey #{nugetKey}"
end
sh "#{NUGET_EXE} push #{FileList["*.nupkg"].first}"
end

View File

@@ -5,9 +5,6 @@ install:
- set PATH=C:\Ruby22\bin;%PATH%
- bundle install
build_script:
- rake publish
- rake preflight
artifacts:
- path: src\**\*.nupkg
environment:
NUGET_KEY:
secure: 5m1zupizmNvVwCg2MDUkRGQbbVfNypLo9yCstTAXQ5KHDypBe5RrGKi1HnEAhAy8

View File

@@ -187,7 +187,12 @@ namespace Owin.Security.Providers.Salesforce
var state = Options.StateDataFormat.Protect(properties);
var authorizationEndpoint =
$"{Options.Endpoints.AuthorizationEndpoint}?response_type={"code"}&client_id={Options.ClientId}&redirect_uri={HttpUtility.UrlEncode(redirectUri)}&display={"page"}&immediate={false}&state={Uri.EscapeDataString(state)}&scope={""}";
$"{Options.Endpoints.AuthorizationEndpoint}?response_type={"code"}&client_id={Options.ClientId}&redirect_uri={HttpUtility.UrlEncode(redirectUri)}&display={"page"}&immediate={false}&state={Uri.EscapeDataString(state)}";
if (Options.Scope != null && Options.Scope.Count > 0)
{
authorizationEndpoint += $"&scope={string.Join(" ", Options.Scope)}";
}
if (Options.Prompt != null)
{