Skip to content

Commit

Permalink
starting the readthedocs stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Dahl committed Jan 27, 2018
1 parent 940644d commit b373299
Show file tree
Hide file tree
Showing 17 changed files with 1,625 additions and 1,180 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,6 @@ Sustainsys.Saml2.StubIdp/App_Data/*.json
*.ndproj
NDependOut
*.coveragexml

#ReadTheDocs output
docs/_build
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"restructuredtext.confPath": "c:\\Users\\edahl\\Saml2"
}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ forms sites.
Note that the Owin & ASP.NET Core2 modules enables SAML identity providers to be integrated within
[IdentityServer3](https://github.com/IdentityServer/IdentityServer3) and
[IdentityServer4](https://github.com/IdentityServer/IdentityServer3) packages. Review
[this document](doc/IdentityServer3Okta.md) to see how to configure Saml2
[this document](docs/IdentityServer3Okta.md) to see how to configure Saml2
with IdentityServer3 and Okta to add Okta as an identity provider to an IdentityServer3 project.
There is also a SampleIdentityServer3 project in the Saml2 repository.

Expand All @@ -37,7 +37,7 @@ contains a Saml2 authentication handler for ASP.NET Core 2.x.

Once the nuget packages are installed you must provide configuration either through code
or through `web.config` sections.
See [configuration](doc/Configuration.md) for details.
See [configuration](docs/Configuration.md) for details.

## Troubleshooting

Expand All @@ -49,8 +49,8 @@ See [configuration](doc/Configuration.md) for details.

## Saml2AuthenticationModule
The Saml2AuthenticationModule provides Saml2 authentication to IIS web sites. In many cases it should just be
[configured](doc/Configuration.md) in and work without any code written in the application
at all (even though [providing an own ClaimsAuthenticationManager](doc/ClaimsAuthenticationManager.md)
[configured](docs/Configuration.md) in and work without any code written in the application
at all (even though [providing an own ClaimsAuthenticationManager](docs/ClaimsAuthenticationManager.md)
for claims translation is highly recommended).

## Mvc Controller
Expand All @@ -62,7 +62,7 @@ over using the authentication module as it integrates with MVC's error handling.
The Owin middleware is modeled after the external authentication modules for social login
(such as Google, Facebook, Twitter). This allows easy integration with ASP.NET Identity
for keeping application specific user and role information. See the
[Owin Middleware](doc/OwinMiddleware.md) page for information on how to set up and use the middleware.
[Owin Middleware](docs/OwinMiddleware.md) page for information on how to set up and use the middleware.

## ASP.NET Core 2 Handler
The ASP.NET Core 2 Handler is compatbile with the ASP.NET Core 2.0 authentication model.
Expand Down
Original file line number Diff line number Diff line change
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/SustainsysIT/Saml2/blob/master/doc/Configuration.md#loading-modules");
"See https://github.com/SustainsysIT/Saml2/blob/master/docs/Configuration.md#loading-modules");
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions docs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"restructuredtext.confPath": "c:\\Users\\edahl\\Saml2\\docs"
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
ClaimsAuthenticationManager
==========================

When using federated authentication the identity provider solely decides what
claims to use to populate the incoming identity. If using multiple identity
providers there is very high probability that they will present the same
information in somewhat different ways. That's where the
`ClaimsAuthenticationManager` fits in. It works as a translation filter
that can modify or replace the incoming identity as soon as it has been
constructed from the incoming authentication response.

Implement a `ClaimsAuthenticationManager` by creating a class derived from the
[`System.Security.Claims.ClaimsAuthenticationManager`](http://msdn.microsoft.com/en-us/library/system.security.claims.claimsauthenticationmanager.aspx)
class.

Then register it with a
[`<claimsAuthenticationManager>`](Configuration.md#claimsauthenticationmanager-element)
element in the configuration if the configuration is loaded from the config file.
If the configuration is done in code (typically for the OWIN middleware) the
`ClaimsAuthenticationManager` should be registered in
`Options.SPOptions.SystemIdentityModelIdentityConfiguration.ClaimsAuthenticationManager`.

## Single Logout
If you are using Single Logout, you need to make sure that the claims containing
the Saml2 logout information are present in the returned identity. The
types of the claims are available in `Saml2ClaimTypes.SessionIndex` and
`Saml2ClaimTypes.LogoutNameIdentifier`.
ClaimsAuthenticationManager
==========================

When using federated authentication the identity provider solely decides what
claims to use to populate the incoming identity. If using multiple identity
providers there is very high probability that they will present the same
information in somewhat different ways. That's where the
`ClaimsAuthenticationManager` fits in. It works as a translation filter
that can modify or replace the incoming identity as soon as it has been
constructed from the incoming authentication response.

Implement a `ClaimsAuthenticationManager` by creating a class derived from the
[`System.Security.Claims.ClaimsAuthenticationManager`](http://msdn.microsoft.com/en-us/library/system.security.claims.claimsauthenticationmanager.aspx)
class.

Then register it with a
[`<claimsAuthenticationManager>`](Configuration.md#claimsauthenticationmanager-element)
element in the configuration if the configuration is loaded from the config file.
If the configuration is done in code (typically for the OWIN middleware) the
`ClaimsAuthenticationManager` should be registered in
`Options.SPOptions.SystemIdentityModelIdentityConfiguration.ClaimsAuthenticationManager`.

## Single Logout
If you are using Single Logout, you need to make sure that the claims containing
the Saml2 logout information are present in the returned identity. The
types of the claims are available in `Saml2ClaimTypes.SessionIndex` and
`Saml2ClaimTypes.LogoutNameIdentifier`.

0 comments on commit b373299

Please sign in to comment.