Skip to content

Commit

Permalink
Bulk rename
Browse files Browse the repository at this point in the history
- Search and replace s/Kentor/Sustainsys/ s/AuthServices/Saml2/
  • Loading branch information
AndersAbel committed Dec 30, 2017
1 parent 1afcd40 commit c56959e
Show file tree
Hide file tree
Showing 316 changed files with 1,514 additions and 1,514 deletions.
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Contributing
===========

Kentor.AuthServices is maintained by and have mostly been developed by Kentor in Stockholm,
Sweden. The library's source code is hosted on [github](https://github.com/KentorIT/authservices).
Sustainsys.Saml2 is maintained by and have mostly been developed by Sustainsys in Stockholm,
Sweden. The library's source code is hosted on [github](https://github.com/SustainsysIT/Saml2).

When doing work on protocol features, it is recommended to consult the
[official SAML specifications](https://wiki.oasis-open.org/security/FrontPage#SAMLV2.0Standard).
Expand All @@ -16,7 +16,7 @@ Discussing before writing code significantly reduces the risk of getting a pull
denied.

## Versioning
Kentor Authentication services uses semantic versioning as defined on http://semver.org/.
Sustainsys Authentication services uses semantic versioning as defined on http://semver.org/.

Given a version number MAJOR.MINOR.PATCH, increment the:

Expand Down Expand Up @@ -46,7 +46,7 @@ not a 30-inch development monster-monitor in vertical orientation).
* The code is formatted to (mostly) fit in 80 columns.

## Unit Tests
The core Kentor.AuthServices library has been developed using TDD (Test Driven Development). All
The core Sustainsys.Saml2 library has been developed using TDD (Test Driven Development). All
functionality is covered by tests, and it will remain that way. Pull requests will only be
merged if they contain tests covering the added functionality. Parts of the code that aren't
practically possible to test because of tight integration with the web server (see e.g.
Expand All @@ -59,14 +59,14 @@ There are also some integration tests that run through the sample applications a
sure that they work. To run the integration tests:
* Make sure that you have Google Chrome installed.
* Open the main solution.
* Set multiple startup projects: Kentor.AuthServices.StubIdp, SampleApplication, SampleMvcApplication
* Set multiple startup projects: Sustainsys.Saml2.StubIdp, SampleApplication, SampleMvcApplication
and SampleOwinApplication.
* Debug the solution.
* Open Kentor.AuthServices.IntegrationTests in a separate Visual Studio Instance.
* Open Sustainsys.Saml2.IntegrationTests in a separate Visual Studio Instance.
* Run all tests in the IntegrationTests solution.

## Continous integration / build server
Kentor.AuthServices contains configuration for [AppVeyor CI](|https://ci.appveyor.com/).
Sustainsys.Saml2 contains configuration for [AppVeyor CI](|https://ci.appveyor.com/).

You may set up a free build of all branches in your GitHub fork by signing up to AppVeyor
(preferably with your GitHub account) and then creating a new project for your GitHub fork.
Expand Down
6 changes: 3 additions & 3 deletions CustomDictionary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
<Word>Auth</Word>
<Word>Authn</Word>
<Word>AuthnRequest</Word>
<Word>Kentor</Word>
<Word>Sustainsys</Word>
<Word>Sustainsys</Word>
<Word>Idp</Word>
<Word>Mvc</Word>
<Word>Acs</Word>
<Word>Owin</Word>
<Word>Sso</Word>
<Word>AuthServices</Word>
<Word>Saml2</Word>
</Recognized>
<Deprecated>
</Deprecated>
<Compound>
</Compound>
<DiscreteExceptions>
<Term>AuthServices</Term>
<Term>Saml2</Term>
</DiscreteExceptions>
</Words>
<Acronyms>
Expand Down
4 changes: 2 additions & 2 deletions Kentor.AuthServices.HttpModule/CommandResultHttpExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Kentor.AuthServices.WebSso;
using Sustainsys.Saml2.WebSso;
using System;
using System.Net;
using System.Web;

namespace Kentor.AuthServices.HttpModule
namespace Sustainsys.Saml2.HttpModule
{
public static partial class CommandResultHttpExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Kentor.AuthServices.WebSso;
using Sustainsys.Saml2.WebSso;
using System;
using System.Diagnostics.CodeAnalysis;
using System.IdentityModel.Services;
Expand All @@ -7,7 +7,7 @@
using System.Web;
using System.Web.Security;

namespace Kentor.AuthServices.HttpModule
namespace Sustainsys.Saml2.HttpModule
{
/// <summary>
/// Extension methods to CommandResult to update a HttpResponseBase.
Expand Down Expand Up @@ -107,7 +107,7 @@ private static void EnsureSessionAuthenticationModuleAvailable()
{
throw new InvalidOperationException(
"FederatedAuthentication.SessionAuthenticationModule is null, make sure you have loaded the SessionAuthenticationModule in web.config. " +
"See https://github.com/KentorIT/authservices/blob/master/doc/Configuration.md#loading-modules");
"See https://github.com/SustainsysIT/Saml2/blob/master/doc/Configuration.md#loading-modules");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions Kentor.AuthServices.HttpModule/HttpRequestBaseExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Kentor.AuthServices.WebSso;
using Sustainsys.Saml2.WebSso;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -8,7 +8,7 @@
using System.Web;
using System.Web.Security;

namespace Kentor.AuthServices.HttpModule
namespace Sustainsys.Saml2.HttpModule
{
/// <summary>
/// Static class that hold extension methods for <see cref="HttpRequestBase"/>.
Expand All @@ -18,7 +18,7 @@ public static class HttpRequestBaseExtensions
/// <summary>
/// Purpose string used with data protection.
/// </summary>
public const string ProtectionPurpose = "Kentor.AuthServices";
public const string ProtectionPurpose = "Sustainsys.Saml2";

/// <summary>
/// Extension method to convert a HttpRequestBase to a HttpRequestData.
Expand Down
6 changes: 3 additions & 3 deletions Kentor.AuthServices.HttpModule/Saml2AuthenticationModule.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Kentor.AuthServices.Configuration;
using Kentor.AuthServices.WebSso;
using Sustainsys.Saml2.Configuration;
using Sustainsys.Saml2.WebSso;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Web;

namespace Kentor.AuthServices.HttpModule
namespace Sustainsys.Saml2.HttpModule
{
/// <summary>
/// Http Module for SAML2 authentication. The module hijacks the
Expand Down
6 changes: 3 additions & 3 deletions Kentor.AuthServices.HttpModule/properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Kentor.AuthServices.HttpModule")]
[assembly: AssemblyTitle("Sustainsys.Saml2.HttpModule")]
[assembly: AssemblyDescription("SAML2 Authentication for ASP.NET")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("Kentor.AuthServices.HttpModule")]
[assembly: AssemblyProduct("Sustainsys.Saml2.HttpModule")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -23,4 +23,4 @@

[assembly: CLSCompliant(true)]

[assembly: InternalsVisibleTo("Kentor.AuthServices.Tests")]
[assembly: InternalsVisibleTo("Sustainsys.Saml2.Tests")]
10 changes: 5 additions & 5 deletions Kentor.AuthServices.Mvc/AuthServicesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
using System.Net;
using System.Web.Mvc;
using System.IdentityModel.Services;
using Kentor.AuthServices.HttpModule;
using Kentor.AuthServices.Configuration;
using Kentor.AuthServices.WebSso;
using Sustainsys.Saml2.HttpModule;
using Sustainsys.Saml2.Configuration;
using Sustainsys.Saml2.WebSso;
using System.Diagnostics.CodeAnalysis;

namespace Kentor.AuthServices.Mvc
namespace Sustainsys.Saml2.Mvc
{
/// <summary>
/// Mvc Controller that provides the authentication functionality.
/// </summary>
[AllowAnonymous]
public class AuthServicesController : Controller
public class Saml2Controller : Controller
{
private static IOptions options = null;

Expand Down
4 changes: 2 additions & 2 deletions Kentor.AuthServices.Mvc/CommandResultExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Kentor.AuthServices.WebSso;
using Sustainsys.Saml2.WebSso;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
Expand All @@ -11,7 +11,7 @@
using System.Web;
using System.Web.Mvc;

namespace Kentor.AuthServices.Mvc
namespace Sustainsys.Saml2.Mvc
{
/// <summary>
/// Extension methods for CommandResult for integrating CommandResults in
Expand Down
4 changes: 2 additions & 2 deletions Kentor.AuthServices.Mvc/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Kentor.AuthServices.Mvc")]
[assembly: AssemblyTitle("Sustainsys.Saml2.Mvc")]
[assembly: AssemblyDescription("SAML2 Authentication for ASP.NET MVC")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("Kentor.AuthServices.Mvc")]
[assembly: AssemblyProduct("Sustainsys.Saml2.Mvc")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
4 changes: 2 additions & 2 deletions Kentor.AuthServices.Owin/CommandResultExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Kentor.AuthServices.WebSso;
using Sustainsys.Saml2.WebSso;
using Microsoft.Owin;
using Microsoft.Owin.Security.DataProtection;
using System;
Expand All @@ -7,7 +7,7 @@
using System.Linq;
using System.Text;

namespace Kentor.AuthServices.Owin
namespace Sustainsys.Saml2.Owin
{
static class CommandResultExtensions
{
Expand Down
4 changes: 2 additions & 2 deletions Kentor.AuthServices.Owin/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using System.Text;
using System.Threading.Tasks;

namespace Kentor.AuthServices.Owin
namespace Sustainsys.Saml2.Owin
{
static class Constants
{
public const string DefaultAuthenticationType = "KentorAuthServices";
public const string DefaultAuthenticationType = "SustainsysSaml2";
public const string DefaultCaption = "SAML2 Federation";
}
}
Binary file modified Kentor.AuthServices.Owin/GlobalSuppressions.cs
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Kentor.AuthServices.Owin;
using Sustainsys.Saml2.Owin;
using Owin;
using System;
using System.Collections.Generic;
Expand All @@ -9,25 +9,25 @@
namespace Owin
{
/// <summary>
/// Extension method to easily attach Kentor AuthServices to the Owin pipeline.
/// Extension method to easily attach Sustainsys Saml2 to the Owin pipeline.
/// </summary>
public static class KentorAuthServicesAuthenticationExtensions
public static class SustainsysSaml2AuthenticationExtensions
{
/// <summary>
/// Add Kentor AuthServices SAML2 authentication to the Owin pipeline.
/// Add Sustainsys Saml2 SAML2 authentication to the Owin pipeline.
/// </summary>
/// <param name="app">Owin pipeline builder.</param>
/// <param name="options">Options for the middleware.</param>
/// <returns></returns>
public static IAppBuilder UseKentorAuthServicesAuthentication(this IAppBuilder app,
KentorAuthServicesAuthenticationOptions options)
public static IAppBuilder UseSustainsysSaml2Authentication(this IAppBuilder app,
SustainsysSaml2AuthenticationOptions options)
{
if (app == null)
{
throw new ArgumentNullException(nameof(app));
}

app.Use(typeof(KentorAuthServicesAuthenticationMiddleware), app, options);
app.Use(typeof(SustainsysSaml2AuthenticationMiddleware), app, options);

return app;
}
Expand Down
22 changes: 11 additions & 11 deletions Kentor.AuthServices.Owin/KentorAuthServicesAuthenticationHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Kentor.AuthServices.Configuration;
using Kentor.AuthServices.WebSso;
using Sustainsys.Saml2.Configuration;
using Sustainsys.Saml2.WebSso;
using Microsoft.Owin;
using Microsoft.Owin.Infrastructure;
using Microsoft.Owin.Security;
Expand All @@ -12,9 +12,9 @@
using System.Text;
using System.Threading.Tasks;

namespace Kentor.AuthServices.Owin
namespace Sustainsys.Saml2.Owin
{
class KentorAuthServicesAuthenticationHandler : AuthenticationHandler<KentorAuthServicesAuthenticationOptions>
class SustainsysSaml2AuthenticationHandler : AuthenticationHandler<SustainsysSaml2AuthenticationOptions>
{
protected async override Task<AuthenticationTicket> AuthenticateCoreAsync()
{
Expand Down Expand Up @@ -120,7 +120,7 @@ protected override async Task ApplyResponseChallengeAsync()
else
{
object objIdp = null;
Context.Environment.TryGetValue("KentorAuthServices.idp", out objIdp);
Context.Environment.TryGetValue("SustainsysSaml2.idp", out objIdp);
idp = objIdp as EntityId;
}
var redirectUri = challenge.Properties.RedirectUri;
Expand Down Expand Up @@ -159,7 +159,7 @@ protected async override Task ApplyResponseGrantAsync()
if (revoke != null)
{
var request = await Context.ToHttpRequestData(Options.DataProtector.Unprotect);
var urls = new AuthServicesUrls(request, Options);
var urls = new Saml2Urls(request, Options);

string redirectUrl = revoke.Properties.RedirectUri;
if (string.IsNullOrEmpty(redirectUrl))
Expand Down Expand Up @@ -187,10 +187,10 @@ protected async override Task ApplyResponseGrantAsync()

public override async Task<bool> InvokeAsync()
{
var authServicesPath = new PathString(Options.SPOptions.ModulePath);
var Saml2Path = new PathString(Options.SPOptions.ModulePath);
PathString remainingPath;

if (Request.Path.StartsWithSegments(authServicesPath, out remainingPath))
if (Request.Path.StartsWithSegments(Saml2Path, out remainingPath))
{
if (remainingPath == new PathString("/" + CommandFactory.AcsCommandName))
{
Expand Down Expand Up @@ -221,7 +221,7 @@ public override async Task<bool> InvokeAsync()
}
catch(Exception ex)
{
Options.SPOptions.Logger.WriteError("Error in AuthServices for " + Request.Path, ex);
Options.SPOptions.Logger.WriteError("Error in Saml2 for " + Request.Path, ex);
throw;
}
}
Expand All @@ -233,8 +233,8 @@ private async Task AugmentAuthenticationGrantWithLogoutClaims(IOwinContext conte
{
var grant = context.Authentication.AuthenticationResponseGrant;
var externalIdentity = await context.Authentication.AuthenticateAsync(Options.SignInAsAuthenticationType);
var sessionIdClaim = externalIdentity?.Identity.FindFirst(AuthServicesClaimTypes.SessionIndex);
var externalLogutNameIdClaim = externalIdentity?.Identity.FindFirst(AuthServicesClaimTypes.LogoutNameIdentifier);
var sessionIdClaim = externalIdentity?.Identity.FindFirst(Saml2ClaimTypes.SessionIndex);
var externalLogutNameIdClaim = externalIdentity?.Identity.FindFirst(Saml2ClaimTypes.LogoutNameIdentifier);

if (grant == null || externalIdentity == null || sessionIdClaim == null || externalLogutNameIdClaim == null)
{
Expand Down
Loading

0 comments on commit c56959e

Please sign in to comment.