1. Project Overview & Quickstart (dotnetcore/LICENSE)
LICENSE
Open-source repository dotnetcore/LICENSE
Repository Details
- Repository: dotnetcore/LICENSE
- Primary Language: Code
Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.
2. Official Technical Reference & Guides (dotnetcore/docs)
File: README.md
ASP.NET Docs
This project provides the source for docs.asp.net. You can learn more about ASP.NET Core at the Home repo.
We accept pull requests! However, before submitting a pull request, please read the CONTRIBUTING guidelines, which include information on how to build the docs locally, as well as style and organizational guidance.
File: CONTRIBUTING.md
Contributing
Information on contributing to this repo is in the Contributing Guide in the Home repo.
The documentation is built using Sphinx and reStructuredText, and then hosted by ReadTheDocs.
Video: Getting Started
Watch a video showing how to get started building the documentation locally.
Building the Docs
Once you have cloned the Docs to your local machine, the following instructions will walk you through installing the tools necessary to build and test.
Download python version 2.7.10 or higher (Version 3.4 is recommended).
If you are installing on Windows, ensure both the Python install directory and the Python scripts directory have been added to your
PATHenvironment variable. For example, if you install Python into the c:\python34 directory, you would addc:\python34;c:\python34\scriptsto yourPATHenvironment variable.Install Sphinx by opening a command prompt and running the following Python command. (Note that this operation might take a few minutes to complete.)
pip install sphinxBy default, when you install Sphinx, it will install the ReadTheDocs custom theme automatically. If you need to update the installed version of this theme, you should run:
pip install -U sphinx_rtd_themeInstall the Sphinx .NET domain:
pip install sphinxcontrib-dotnetdomainNavigate to one of the main project subdirectories in the Docs repo - such as
mvc,aspnet, orwebhooks.Run
make(make.bat on Windows, Makefile on Mac/Linux)make htmlOnce make completes, the generated docs will be in the .../docs//_build/html directory. Simply open the
index.htmlfile in your browser to see the built docs for that project.
Use autobuild to easily view site changes locally
You can also install sphinx-autobuild which will run a local web server and automatically refresh whenever changes to the source files are detected. To do so:
Install sphinx-autobuild
pip install sphinx-autobuildNavigate to one of the main project subdirectories in the Docs repo - such as
mvc,aspnet, orwebhooks.Run
make(make.bat on Windows, Makefile on Mac/Linux)make livehtmlBrowse to
http://127.0.0.1:8000to see the locally built documentation.Hit
^Cto stop the local server.
Adding Content
Before adding content, submit an issue with a suggestion for your proposed article. Provide detail on what the article would discuss, and how it would relate to existing documentation.
Also, please review the following style guides:
Articles should be organized into logical groups or sections. Each section should be given a named folder (e.g. /yourfirst). That section contains the rst files for all articles in the section. For images and other static resources, create a subfolder that matches the name of the article. Within this subfolder, create a sample folder for code samples and a _static folder for images and other static content.
Example Structure
docs
/client-side
/angular
/_static
controllers.png
events.png
...
/sample
(sample code)
/bootstrap
/_static
about-page.png
...
angular.rst
bootstrap.rstNote: Sphinx will automatically fix duplicate image names, such as the about-page.png files shown above. There is no need to try to ensure uniqueness of static files beyond an individual article.
Author information should be placed in the _authors folder following the example of steve-smith.rst. Place photos in the photos folder - size them to be no more than 125px wide or tall.
Process for Contributing
Step 1: Open an Issue describing the article you wish to write and how it relates to existing content. Get approval to write your article.
Step 2: Fork the /aspnet/docs repo.
Step 3: Create a branch for your article.
Step 4: Write your article, placing the article in its own folder and any needed images in a _static folder located in the same folder as the article. Be sure to follow the ASP.NET Docs Style Guide. If you have code samples, place them in a folder within the /samples/ folder.
Step 5: Submit a Pull Request from your branch to aspnet/docs/master.
Step 6: Discuss the Pull Request with the ASP.NET team; make any requested updates to your branch. When they are ready to accept the PR, they will add a :shipit: (:shipit:) comment.
Step 7: The last step before your Pull Request is accepted is to squash all commits into a single commit message. Do this in your branch, using the rebase git command. For example, if you want to squash the last 4 commits into a single commit, you would use:
git rebase -i HEAD~4The -i option stands for "interactive" and should open a text editor showing the last N commits, preceded with "pick ". Change all but the first instance of "pick " to "squash " and save the file and exit the editor. A more detailed answer is available here.
Common Pitfalls
Below are some common pitfalls you should try to avoid:
- Don't forget to submit an issue before starting work on an article
- Don't forget to create a separate branch before working on your article
- Don't update or
mergeyour branch after you submit your pull request - Don't forget to squash your commits once your pull request is ready to be accepted
- If updating code samples in
/samples/, be sure any line number references in your article remain correct
File: LICENSE.txt
Copyright (c) .NET Foundation and contributors. All rights reserved.
Documentation is licensed under the Creative Commons Attribution 4.0
International License (http://creativecommons.org/licenses/by/4.0/legalcode).
Code is licensed under the MIT License (https://opensource.org/licenses/MIT).
This license does not grant you rights to use any trademarks or logos of
Microsoft. For Microsoft’s general trademark guidelines, go to
http://go.microsoft.com/fwlink/?LinkID=254653.
File: requirements.txt
Sphinx==1.4.1
sphinx-rtd-theme
sphinx-autobuild
git+git://github.com/danroth27/yasfb-py3
git+git://github.com/rtfd/sphinxcontrib-dotnetdomain
File: .travis.yml
sudo: false
branches:
only:
- master
- release
- dev
- /^(./)?ci-.$/
language: python
python:
- "3.4"
command to install dependencies
install: "pip install -q -r requirements.txt"
command to run tests
script:
- sphinx-build -nW -b html -d aspnet/_build/doctrees aspnet aspnet/_build/html
Flags used here, not in `make html`:
-n Run in nit-picky mode. Currently, this generates warnings for all missing references.
-W Turn warnings into errors. This means that the build stops at the first warning and sphinx-build exits with exit status 1.
File: api/index.rst
.. _aspnet-api:
ASP.NET Core API Reference Documentation
.. toctree::
:includehidden:
:glob:
:maxdepth: 1
/autoapi/Microsoft/AspNet/Identity/CoreCompat/index
/autoapi/Microsoft/AspNetCore/Antiforgery/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/index
/autoapi/Microsoft/AspNetCore/Authentication/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/index
/autoapi/Microsoft/AspNetCore/Authentication/Facebook/index
/autoapi/Microsoft/AspNetCore/Authentication/Google/index
/autoapi/Microsoft/AspNetCore/Authentication/JwtBearer/index
/autoapi/Microsoft/AspNetCore/Authentication/MicrosoftAccount/index
/autoapi/Microsoft/AspNetCore/Authentication/OAuth/index
/autoapi/Microsoft/AspNetCore/Authentication/OpenIdConnect/index
/autoapi/Microsoft/AspNetCore/Authentication/Twitter/index
/autoapi/Microsoft/AspNetCore/Authorization/index
/autoapi/Microsoft/AspNetCore/Authorization/Infrastructure/index
/autoapi/Microsoft/AspNetCore/Builder/index
/autoapi/Microsoft/AspNetCore/Builder/Extensions/index
/autoapi/Microsoft/AspNetCore/Builder/Internal/index
/autoapi/Microsoft/AspNetCore/CookiePolicy/index
/autoapi/Microsoft/AspNetCore/Cors/index
/autoapi/Microsoft/AspNetCore/Cors/Infrastructure/index
/autoapi/Microsoft/AspNetCore/Cryptography/KeyDerivation/index
/autoapi/Microsoft/AspNetCore/DataProtection/index
/autoapi/Microsoft/AspNetCore/DataProtection/AuthenticatedEncryption/index
/autoapi/Microsoft/AspNetCore/DataProtection/AuthenticatedEncryption/ConfigurationModel/index
/autoapi/Microsoft/AspNetCore/DataProtection/Cng/Internal/index
/autoapi/Microsoft/AspNetCore/DataProtection/Infrastructure/index
/autoapi/Microsoft/AspNetCore/DataProtection/Internal/index
/autoapi/Microsoft/AspNetCore/DataProtection/KeyManagement/index
/autoapi/Microsoft/AspNetCore/DataProtection/KeyManagement/Internal/index
/autoapi/Microsoft/AspNetCore/DataProtection/Repositories/index
/autoapi/Microsoft/AspNetCore/DataProtection/SystemWeb/index
/autoapi/Microsoft/AspNetCore/DataProtection/XmlEncryption/index
/autoapi/Microsoft/AspNetCore/Diagnostics/index
/autoapi/Microsoft/AspNetCore/Diagnostics/Elm/index
/autoapi/Microsoft/AspNetCore/Diagnostics/Elm/Views/index
/autoapi/Microsoft/AspNetCore/Diagnostics/EntityFrameworkCore/index
/autoapi/Microsoft/AspNetCore/Diagnostics/EntityFrameworkCore/Views/index
/autoapi/Microsoft/AspNetCore/Diagnostics/Views/index
/autoapi/Microsoft/AspNetCore/DiagnosticsViewPage/Views/index
/autoapi/Microsoft/AspNetCore/Hosting/index
/autoapi/Microsoft/AspNetCore/Hosting/Builder/index
/autoapi/Microsoft/AspNetCore/Hosting/Internal/index
/autoapi/Microsoft/AspNetCore/Hosting/Server/index
/autoapi/Microsoft/AspNetCore/Hosting/Server/Features/index
/autoapi/Microsoft/AspNetCore/Hosting/WindowsServices/index
/autoapi/Microsoft/AspNetCore/Html/index
/autoapi/Microsoft/AspNetCore/Http/index
/autoapi/Microsoft/AspNetCore/Http/Authentication/index
/autoapi/Microsoft/AspNetCore/Http/Authentication/Internal/index
/autoapi/Microsoft/AspNetCore/Http/Extensions/index
/autoapi/Microsoft/AspNetCore/Http/Features/index
/autoapi/Microsoft/AspNetCore/Http/Features/Authentication/index
/autoapi/Microsoft/AspNetCore/Http/Headers/index
/autoapi/Microsoft/AspNetCore/Http/Internal/index
/autoapi/Microsoft/AspNetCore/Identity/index
/autoapi/Microsoft/AspNetCore/Identity/EntityFrameworkCore/index
/autoapi/Microsoft/AspNetCore/JsonPatch/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Adapters/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Converters/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Exceptions/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Helpers/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Operations/index
/autoapi/Microsoft/AspNetCore/Localization/index
/autoapi/Microsoft/AspNetCore/MiddlewareAnalysis/index
/autoapi/Microsoft/AspNetCore/Mvc/index
/autoapi/Microsoft/AspNetCore/Mvc/Abstractions/index
/autoapi/Microsoft/AspNetCore/Mvc/ActionConstraints/index
/autoapi/Microsoft/AspNetCore/Mvc/ApiExplorer/index
/autoapi/Microsoft/AspNetCore/Mvc/ApplicationModels/index
/autoapi/Microsoft/AspNetCore/Mvc/ApplicationParts/index
/autoapi/Microsoft/AspNetCore/Mvc/Authorization/index
/autoapi/Microsoft/AspNetCore/Mvc/Controllers/index
/autoapi/Microsoft/AspNetCore/Mvc/Cors/index
/autoapi/Microsoft/AspNetCore/Mvc/Cors/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/DataAnnotations/index
/autoapi/Microsoft/AspNetCore/Mvc/DataAnnotations/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Filters/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/Json/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/Xml/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/Xml/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Infrastructure/index
/autoapi/Microsoft/AspNetCore/Mvc/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Localization/index
/autoapi/Microsoft/AspNetCore/Mvc/Localization/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/Binders/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/Metadata/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/Validation/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/Compilation/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/Directives/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Mvc/Rendering/index
/autoapi/Microsoft/AspNetCore/Mvc/Routing/index
/autoapi/Microsoft/AspNetCore/Mvc/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Mvc/TagHelpers/Cache/index
/autoapi/Microsoft/AspNetCore/Mvc/TagHelpers/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/ViewComponents/index
/autoapi/Microsoft/AspNetCore/Mvc/ViewEngines/index
/autoapi/Microsoft/AspNetCore/Mvc/ViewFeatures/index
/autoapi/Microsoft/AspNetCore/Mvc/ViewFeatures/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/WebApiCompatShim/index
/autoapi/Microsoft/AspNetCore/Owin/index
/autoapi/Microsoft/AspNetCore/Razor/index
/autoapi/Microsoft/AspNetCore/Razor/Chunks/index
/autoapi/Microsoft/AspNetCore/Razor/Chunks/Generators/index
/autoapi/Microsoft/AspNetCore/Razor/CodeGenerators/index
/autoapi/Microsoft/AspNetCore/Razor/CodeGenerators/Visitors/index
/autoapi/Microsoft/AspNetCore/Razor/Compilation/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Razor/Editor/index
/autoapi/Microsoft/AspNetCore/Razor/Generator/index
/autoapi/Microsoft/AspNetCore/Razor/Internal/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/Internal/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/SyntaxTree/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/TagHelpers/Internal/index
/autoapi/Microsoft/AspNetCore/Razor/Runtime/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Razor/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Razor/Text/index
/autoapi/Microsoft/AspNetCore/Razor/Tokenizer/index
/autoapi/Microsoft/AspNetCore/Razor/Tokenizer/Internal/index
/autoapi/Microsoft/AspNetCore/Razor/Tokenizer/Symbols/index
/autoapi/Microsoft/AspNetCore/Razor/Tokenizer/Symbols/Internal/index
/autoapi/Microsoft/AspNetCore/Routing/index
/autoapi/Microsoft/AspNetCore/Routing/Constraints/index
/autoapi/Microsoft/AspNetCore/Routing/Internal/index
/autoapi/Microsoft/AspNetCore/Routing/Template/index
/autoapi/Microsoft/AspNetCore/Routing/Tree/index
/autoapi/Microsoft/AspNetCore/Server/IISIntegration/index
/autoapi/Microsoft/AspNetCore/Server/IISIntegration/Tools/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Filter/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Filter/Internal/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Https/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Internal/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Internal/Http/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Internal/Infrastructure/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Internal/Networking/index
/autoapi/Microsoft/AspNetCore/Server/Testing/index
/autoapi/Microsoft/AspNetCore/Server/Testing/Common/index
/autoapi/Microsoft/AspNetCore/Server/WebListener/index
/autoapi/Microsoft/AspNetCore/Server/WebListener/Internal/index
/autoapi/Microsoft/AspNetCore/Session/index
/autoapi/Microsoft/AspNetCore/StaticFiles/index
/autoapi/Microsoft/AspNetCore/StaticFiles/Infrastructure/index
/autoapi/Microsoft/AspNetCore/TestHost/index
/autoapi/Microsoft/AspNetCore/WebUtilities/index
/autoapi/Microsoft/Extensions/Caching/Distributed/index
/autoapi/Microsoft/Extensions/Caching/Memory/index
/autoapi/Microsoft/Extensions/Caching/Redis/index
/autoapi/Microsoft/Extensions/Caching/SqlConfig/Tools/index
/autoapi/Microsoft/Extensions/Caching/SqlServer/index
/autoapi/Microsoft/Extensions/Cli/Utils/index
/autoapi/Microsoft/Extensions/CommandLineUtils/index
/autoapi/Microsoft/Extensions/Configuration/index
/autoapi/Microsoft/Extensions/Configuration/CommandLine/index
/autoapi/Microsoft/Extensions/Configuration/EnvironmentVariables/index
/autoapi/Microsoft/Extensions/Configuration/Ini/index
/autoapi/Microsoft/Extensions/Configuration/Json/index
/autoapi/Microsoft/Extensions/Configuration/Memory/index
/autoapi/Microsoft/Extensions/Configuration/Xml/index
/autoapi/Microsoft/Extensions/DependencyInjection/index
/autoapi/Microsoft/Extensions/DependencyInjection/Extensions/index
/autoapi/Microsoft/Extensions/DependencyInjection/Specification/index
/autoapi/Microsoft/Extensions/DependencyInjection/Specification/Fakes/index
/autoapi/Microsoft/Extensions/DiagnosticAdapter/index
/autoapi/Microsoft/Extensions/DiagnosticAdapter/Infrastructure/index
/autoapi/Microsoft/Extensions/DiagnosticAdapter/Internal/index
/autoapi/Microsoft/Extensions/FileProviders/index
/autoapi/Microsoft/Extensions/FileProviders/Composite/index
/autoapi/Microsoft/Extensions/FileProviders/Embedded/index
/autoapi/Microsoft/Extensions/FileProviders/Physical/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Abstractions/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Internal/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Internal/PathSegments/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Internal/PatternContexts/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Internal/Patterns/index
/autoapi/Microsoft/Extensions/Globalization/index
/autoapi/Microsoft/Extensions/Internal/index
/autoapi/Microsoft/Extensions/Localization/index
/autoapi/Microsoft/Extensions/Localization/Internal/index
/autoapi/Microsoft/Extensions/Logging/index
/autoapi/Microsoft/Extensions/Logging/Abstractions/Internal/index
/autoapi/Microsoft/Extensions/Logging/Console/index
/autoapi/Microsoft/Extensions/Logging/Console/Internal/index
/autoapi/Microsoft/Extensions/Logging/Debug/index
/autoapi/Microsoft/Extensions/Logging/EventLog/index
/autoapi/Microsoft/Extensions/Logging/EventLog/Internal/index
/autoapi/Microsoft/Extensions/Logging/Filter/Internal/index
/autoapi/Microsoft/Extensions/Logging/Internal/index
/autoapi/Microsoft/Extensions/Logging/Testing/index
/autoapi/Microsoft/Extensions/Logging/TraceSource/index
/autoapi/Microsoft/Extensions/ObjectPool/index
/autoapi/Microsoft/Extensions/Options/index
/autoapi/Microsoft/Extensions/PlatformAbstractions/index
/autoapi/Microsoft/Extensions/Primitives/index
/autoapi/Microsoft/Extensions/WebEncoders/index
/autoapi/Microsoft/Extensions/WebEncoders/Testing/index
/autoapi/Microsoft/Net/Http/Headers/index
/autoapi/Microsoft/Net/Http/Server/index
/autoapi/Microsoft/Net/WebSockets/index
/autoapi/Microsoft/Owin/Security/Interop/index
/autoapi/Owin/index
/autoapi/PageGenerator/index
/autoapi/System/Diagnostics/index
/autoapi/System/Net/Http/index
/autoapi/System/Security/Claims/index
/autoapi/System/Threading/index
/autoapi/System/Web/Http/index
File: api/autoapi/index.rst
Sphinx AutoAPI Index
####################
This page is the top-level of your generated API documentation.
Below is a list of all items that are documented here.
.. toctree::
:includehidden:
:glob:
:maxdepth: 1
/autoapi/Microsoft/AspNet/Identity/CoreCompat/index
/autoapi/Microsoft/AspNetCore/Antiforgery/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/index
/autoapi/Microsoft/AspNetCore/Authentication/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/index
/autoapi/Microsoft/AspNetCore/Authentication/Facebook/index
/autoapi/Microsoft/AspNetCore/Authentication/Google/index
/autoapi/Microsoft/AspNetCore/Authentication/JwtBearer/index
/autoapi/Microsoft/AspNetCore/Authentication/MicrosoftAccount/index
/autoapi/Microsoft/AspNetCore/Authentication/OAuth/index
/autoapi/Microsoft/AspNetCore/Authentication/OpenIdConnect/index
/autoapi/Microsoft/AspNetCore/Authentication/Twitter/index
/autoapi/Microsoft/AspNetCore/Authorization/index
/autoapi/Microsoft/AspNetCore/Authorization/Infrastructure/index
/autoapi/Microsoft/AspNetCore/Builder/index
/autoapi/Microsoft/AspNetCore/Builder/Extensions/index
/autoapi/Microsoft/AspNetCore/Builder/Internal/index
/autoapi/Microsoft/AspNetCore/CookiePolicy/index
/autoapi/Microsoft/AspNetCore/Cors/index
/autoapi/Microsoft/AspNetCore/Cors/Infrastructure/index
/autoapi/Microsoft/AspNetCore/Cryptography/KeyDerivation/index
/autoapi/Microsoft/AspNetCore/DataProtection/index
/autoapi/Microsoft/AspNetCore/DataProtection/AuthenticatedEncryption/index
/autoapi/Microsoft/AspNetCore/DataProtection/AuthenticatedEncryption/ConfigurationModel/index
/autoapi/Microsoft/AspNetCore/DataProtection/Cng/Internal/index
/autoapi/Microsoft/AspNetCore/DataProtection/Infrastructure/index
/autoapi/Microsoft/AspNetCore/DataProtection/Internal/index
/autoapi/Microsoft/AspNetCore/DataProtection/KeyManagement/index
/autoapi/Microsoft/AspNetCore/DataProtection/KeyManagement/Internal/index
/autoapi/Microsoft/AspNetCore/DataProtection/Repositories/index
/autoapi/Microsoft/AspNetCore/DataProtection/SystemWeb/index
/autoapi/Microsoft/AspNetCore/DataProtection/XmlEncryption/index
/autoapi/Microsoft/AspNetCore/Diagnostics/index
/autoapi/Microsoft/AspNetCore/Diagnostics/Elm/index
/autoapi/Microsoft/AspNetCore/Diagnostics/Elm/Views/index
/autoapi/Microsoft/AspNetCore/Diagnostics/EntityFrameworkCore/index
/autoapi/Microsoft/AspNetCore/Diagnostics/EntityFrameworkCore/Views/index
/autoapi/Microsoft/AspNetCore/Diagnostics/Views/index
/autoapi/Microsoft/AspNetCore/DiagnosticsViewPage/Views/index
/autoapi/Microsoft/AspNetCore/Hosting/index
/autoapi/Microsoft/AspNetCore/Hosting/Builder/index
/autoapi/Microsoft/AspNetCore/Hosting/Internal/index
/autoapi/Microsoft/AspNetCore/Hosting/Server/index
/autoapi/Microsoft/AspNetCore/Hosting/Server/Features/index
/autoapi/Microsoft/AspNetCore/Hosting/WindowsServices/index
/autoapi/Microsoft/AspNetCore/Html/index
/autoapi/Microsoft/AspNetCore/Http/index
/autoapi/Microsoft/AspNetCore/Http/Authentication/index
/autoapi/Microsoft/AspNetCore/Http/Authentication/Internal/index
/autoapi/Microsoft/AspNetCore/Http/Extensions/index
/autoapi/Microsoft/AspNetCore/Http/Features/index
/autoapi/Microsoft/AspNetCore/Http/Features/Authentication/index
/autoapi/Microsoft/AspNetCore/Http/Headers/index
/autoapi/Microsoft/AspNetCore/Http/Internal/index
/autoapi/Microsoft/AspNetCore/Identity/index
/autoapi/Microsoft/AspNetCore/Identity/EntityFrameworkCore/index
/autoapi/Microsoft/AspNetCore/JsonPatch/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Adapters/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Converters/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Exceptions/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Helpers/index
/autoapi/Microsoft/AspNetCore/JsonPatch/Operations/index
/autoapi/Microsoft/AspNetCore/Localization/index
/autoapi/Microsoft/AspNetCore/MiddlewareAnalysis/index
/autoapi/Microsoft/AspNetCore/Mvc/index
/autoapi/Microsoft/AspNetCore/Mvc/Abstractions/index
/autoapi/Microsoft/AspNetCore/Mvc/ActionConstraints/index
/autoapi/Microsoft/AspNetCore/Mvc/ApiExplorer/index
/autoapi/Microsoft/AspNetCore/Mvc/ApplicationModels/index
/autoapi/Microsoft/AspNetCore/Mvc/ApplicationParts/index
/autoapi/Microsoft/AspNetCore/Mvc/Authorization/index
/autoapi/Microsoft/AspNetCore/Mvc/Controllers/index
/autoapi/Microsoft/AspNetCore/Mvc/Cors/index
/autoapi/Microsoft/AspNetCore/Mvc/Cors/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/DataAnnotations/index
/autoapi/Microsoft/AspNetCore/Mvc/DataAnnotations/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Filters/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/Json/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/Xml/index
/autoapi/Microsoft/AspNetCore/Mvc/Formatters/Xml/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Infrastructure/index
/autoapi/Microsoft/AspNetCore/Mvc/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Localization/index
/autoapi/Microsoft/AspNetCore/Mvc/Localization/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/Binders/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/Metadata/index
/autoapi/Microsoft/AspNetCore/Mvc/ModelBinding/Validation/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/Compilation/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/Directives/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/Razor/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Mvc/Rendering/index
/autoapi/Microsoft/AspNetCore/Mvc/Routing/index
/autoapi/Microsoft/AspNetCore/Mvc/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Mvc/TagHelpers/Cache/index
/autoapi/Microsoft/AspNetCore/Mvc/TagHelpers/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/ViewComponents/index
/autoapi/Microsoft/AspNetCore/Mvc/ViewEngines/index
/autoapi/Microsoft/AspNetCore/Mvc/ViewFeatures/index
/autoapi/Microsoft/AspNetCore/Mvc/ViewFeatures/Internal/index
/autoapi/Microsoft/AspNetCore/Mvc/WebApiCompatShim/index
/autoapi/Microsoft/AspNetCore/Owin/index
/autoapi/Microsoft/AspNetCore/Razor/index
/autoapi/Microsoft/AspNetCore/Razor/Chunks/index
/autoapi/Microsoft/AspNetCore/Razor/Chunks/Generators/index
/autoapi/Microsoft/AspNetCore/Razor/CodeGenerators/index
/autoapi/Microsoft/AspNetCore/Razor/CodeGenerators/Visitors/index
/autoapi/Microsoft/AspNetCore/Razor/Compilation/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Razor/Editor/index
/autoapi/Microsoft/AspNetCore/Razor/Generator/index
/autoapi/Microsoft/AspNetCore/Razor/Internal/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/Internal/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/SyntaxTree/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Razor/Parser/TagHelpers/Internal/index
/autoapi/Microsoft/AspNetCore/Razor/Runtime/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Razor/TagHelpers/index
/autoapi/Microsoft/AspNetCore/Razor/Text/index
/autoapi/Microsoft/AspNetCore/Razor/Tokenizer/index
/autoapi/Microsoft/AspNetCore/Razor/Tokenizer/Internal/index
/autoapi/Microsoft/AspNetCore/Razor/Tokenizer/Symbols/index
/autoapi/Microsoft/AspNetCore/Razor/Tokenizer/Symbols/Internal/index
/autoapi/Microsoft/AspNetCore/Routing/index
/autoapi/Microsoft/AspNetCore/Routing/Constraints/index
/autoapi/Microsoft/AspNetCore/Routing/Internal/index
/autoapi/Microsoft/AspNetCore/Routing/Template/index
/autoapi/Microsoft/AspNetCore/Routing/Tree/index
/autoapi/Microsoft/AspNetCore/Server/IISIntegration/index
/autoapi/Microsoft/AspNetCore/Server/IISIntegration/Tools/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Filter/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Filter/Internal/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Https/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Internal/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Internal/Http/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Internal/Infrastructure/index
/autoapi/Microsoft/AspNetCore/Server/Kestrel/Internal/Networking/index
/autoapi/Microsoft/AspNetCore/Server/Testing/index
/autoapi/Microsoft/AspNetCore/Server/Testing/Common/index
/autoapi/Microsoft/AspNetCore/Server/WebListener/index
/autoapi/Microsoft/AspNetCore/Server/WebListener/Internal/index
/autoapi/Microsoft/AspNetCore/Session/index
/autoapi/Microsoft/AspNetCore/StaticFiles/index
/autoapi/Microsoft/AspNetCore/StaticFiles/Infrastructure/index
/autoapi/Microsoft/AspNetCore/TestHost/index
/autoapi/Microsoft/AspNetCore/WebUtilities/index
/autoapi/Microsoft/Extensions/Caching/Distributed/index
/autoapi/Microsoft/Extensions/Caching/Memory/index
/autoapi/Microsoft/Extensions/Caching/Redis/index
/autoapi/Microsoft/Extensions/Caching/SqlConfig/Tools/index
/autoapi/Microsoft/Extensions/Caching/SqlServer/index
/autoapi/Microsoft/Extensions/Cli/Utils/index
/autoapi/Microsoft/Extensions/CommandLineUtils/index
/autoapi/Microsoft/Extensions/Configuration/index
/autoapi/Microsoft/Extensions/Configuration/CommandLine/index
/autoapi/Microsoft/Extensions/Configuration/EnvironmentVariables/index
/autoapi/Microsoft/Extensions/Configuration/Ini/index
/autoapi/Microsoft/Extensions/Configuration/Json/index
/autoapi/Microsoft/Extensions/Configuration/Memory/index
/autoapi/Microsoft/Extensions/Configuration/Xml/index
/autoapi/Microsoft/Extensions/DependencyInjection/index
/autoapi/Microsoft/Extensions/DependencyInjection/Extensions/index
/autoapi/Microsoft/Extensions/DependencyInjection/Specification/index
/autoapi/Microsoft/Extensions/DependencyInjection/Specification/Fakes/index
/autoapi/Microsoft/Extensions/DiagnosticAdapter/index
/autoapi/Microsoft/Extensions/DiagnosticAdapter/Infrastructure/index
/autoapi/Microsoft/Extensions/DiagnosticAdapter/Internal/index
/autoapi/Microsoft/Extensions/FileProviders/index
/autoapi/Microsoft/Extensions/FileProviders/Composite/index
/autoapi/Microsoft/Extensions/FileProviders/Embedded/index
/autoapi/Microsoft/Extensions/FileProviders/Physical/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Abstractions/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Internal/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Internal/PathSegments/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Internal/PatternContexts/index
/autoapi/Microsoft/Extensions/FileSystemGlobbing/Internal/Patterns/index
/autoapi/Microsoft/Extensions/Globalization/index
/autoapi/Microsoft/Extensions/Internal/index
/autoapi/Microsoft/Extensions/Localization/index
/autoapi/Microsoft/Extensions/Localization/Internal/index
/autoapi/Microsoft/Extensions/Logging/index
/autoapi/Microsoft/Extensions/Logging/Abstractions/Internal/index
/autoapi/Microsoft/Extensions/Logging/Console/index
/autoapi/Microsoft/Extensions/Logging/Console/Internal/index
/autoapi/Microsoft/Extensions/Logging/Debug/index
/autoapi/Microsoft/Extensions/Logging/EventLog/index
/autoapi/Microsoft/Extensions/Logging/EventLog/Internal/index
/autoapi/Microsoft/Extensions/Logging/Filter/Internal/index
/autoapi/Microsoft/Extensions/Logging/Internal/index
/autoapi/Microsoft/Extensions/Logging/Testing/index
/autoapi/Microsoft/Extensions/Logging/TraceSource/index
/autoapi/Microsoft/Extensions/ObjectPool/index
/autoapi/Microsoft/Extensions/Options/index
/autoapi/Microsoft/Extensions/PlatformAbstractions/index
/autoapi/Microsoft/Extensions/Primitives/index
/autoapi/Microsoft/Extensions/WebEncoders/index
/autoapi/Microsoft/Extensions/WebEncoders/Testing/index
/autoapi/Microsoft/Net/Http/Headers/index
/autoapi/Microsoft/Net/Http/Server/index
/autoapi/Microsoft/Net/WebSockets/index
/autoapi/Microsoft/Owin/Security/Interop/index
/autoapi/Owin/index
/autoapi/PageGenerator/index
/autoapi/System/Diagnostics/index
/autoapi/System/Net/Http/index
/autoapi/System/Security/Claims/index
/autoapi/System/Threading/index
/autoapi/System/Web/Http/index
File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/index.rst
Microsoft.AspNet.Identity.CoreCompat Namespace
.. toctree::
:hidden:
:maxdepth: 2
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityDbContext-TUser/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityDbContext-TUser-TRole-TKey-TUserLogin-TUserRole-TUserClaim-TRoleClaim/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityRole/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityRoleClaim/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityRoleClaim-TKey/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityRole-TKey-TUserRole/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityUser/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityUserLogin/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityUserLogin-TKey/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityUser-TKey-TUserLogin-TUserRole-TUserClaim/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/UserStore-TUser/index
/autoapi/Microsoft/AspNet/Identity/CoreCompat/UserStore-TUser-TRole-TKey-TUserLogin-TUserRole-TUserClaim/index
.. toctree::
:hidden:
:maxdepth: 2
.. dn:namespace:: Microsoft.AspNet.Identity.CoreCompat
.. rubric:: Classes
class :dn:cls:`IdentityDbContext\<TUser>`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext\<TUser>
class :dn:cls:`IdentityDbContext\<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext\<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>
class :dn:cls:`IdentityRole`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityRole
class :dn:cls:`IdentityRoleClaim`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim
class :dn:cls:`IdentityRoleClaim\<TKey>`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim\<TKey>
EntityType that represents one specific role claim
class :dn:cls:`IdentityRole\<TKey, TUserRole>`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityRole\<TKey, TUserRole>
class :dn:cls:`IdentityUser`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityUser
class :dn:cls:`IdentityUserLogin`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin
class :dn:cls:`IdentityUserLogin\<TKey>`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin\<TKey>
Represents a login and its associated provider for a user.
class :dn:cls:`IdentityUser\<TKey, TUserLogin, TUserRole, TUserClaim>`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.IdentityUser\<TKey, TUserLogin, TUserRole, TUserClaim>
class :dn:cls:`UserStore\<TUser>`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.UserStore\<TUser>
class :dn:cls:`UserStore\<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>`
.. object: type=class name=Microsoft.AspNet.Identity.CoreCompat.UserStore\<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityDbContext-TUser/index.rst
IdentityDbContext Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
System.Data.Entity.DbContext - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext{{TUser},Microsoft.AspNet.Identity.CoreCompat.IdentityRole,System.String,Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin,Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole,Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext{{TUser},Microsoft.AspNet.Identity.CoreCompat.IdentityRole,System.String,Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin,Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole,Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim,Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext\<TUser>
Syntax
.. code-block:: csharp
public class IdentityDbContext<TUser> : IdentityDbContext<TUser, IdentityRole, string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim, IdentityRoleClaim>, IDisposable, IObjectContextAdapter where TUser : IdentityUser.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext`1
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext
Constructors
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser>.IdentityDbContext()
.. code-block:: csharp
public IdentityDbContext()
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser>.IdentityDbContext(System.Data.Common.DbConnection, System.Boolean)
:type existingConnection: System.Data.Common.DbConnection
:type contextOwnsConnection: System.Boolean
.. code-block:: csharp
public IdentityDbContext(DbConnection existingConnection, bool contextOwnsConnection)
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser>.IdentityDbContext(System.Data.Common.DbConnection, System.Data.Entity.Infrastructure.DbCompiledModel, System.Boolean)
:type existingConnection: System.Data.Common.DbConnection
:type model: System.Data.Entity.Infrastructure.DbCompiledModel
:type contextOwnsConnection: System.Boolean
.. code-block:: csharp
public IdentityDbContext(DbConnection existingConnection, DbCompiledModel model, bool contextOwnsConnection)
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser>.IdentityDbContext(System.Data.Entity.Infrastructure.DbCompiledModel)
:type model: System.Data.Entity.Infrastructure.DbCompiledModel
.. code-block:: csharp
public IdentityDbContext(DbCompiledModel model)
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser>.IdentityDbContext(System.String)
:type nameOrConnectionString: System.String
.. code-block:: csharp
public IdentityDbContext(string nameOrConnectionString)
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser>.IdentityDbContext(System.String, System.Data.Entity.Infrastructure.DbCompiledModel)
:type nameOrConnectionString: System.String
:type model: System.Data.Entity.Infrastructure.DbCompiledModel
.. code-block:: csharp
public IdentityDbContext(string nameOrConnectionString, DbCompiledModel model)File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityDbContext-TUser-TRole-TKey-TUserLogin-TUserRole-TUserClaim-TRoleClaim/index.rst
IdentityDbContext Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
System.Data.Entity.DbContext - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext{{TUser},{TRole},{TKey},{TUserLogin},{TUserRole},{TUserClaim}} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext\<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>
Syntax
.. code-block:: csharp
public class IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim> : IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>, IDisposable, IObjectContextAdapter where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim> where TRole : IdentityRole<TKey, TUserRole> where TUserLogin : IdentityUserLogin<TKey> where TUserRole : IdentityUserRole<TKey> where TUserClaim : IdentityUserClaim<TKey> where TRoleClaim : IdentityRoleClaim<TKey>.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext`7
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>
Constructors
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>.IdentityDbContext()
.. code-block:: csharp
public IdentityDbContext()
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>.IdentityDbContext(System.Data.Common.DbConnection, System.Boolean)
:type existingConnection: System.Data.Common.DbConnection
:type contextOwnsConnection: System.Boolean
.. code-block:: csharp
public IdentityDbContext(DbConnection existingConnection, bool contextOwnsConnection)
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>.IdentityDbContext(System.Data.Common.DbConnection, System.Data.Entity.Infrastructure.DbCompiledModel, System.Boolean)
:type existingConnection: System.Data.Common.DbConnection
:type model: System.Data.Entity.Infrastructure.DbCompiledModel
:type contextOwnsConnection: System.Boolean
.. code-block:: csharp
public IdentityDbContext(DbConnection existingConnection, DbCompiledModel model, bool contextOwnsConnection)
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>.IdentityDbContext(System.Data.Entity.Infrastructure.DbCompiledModel)
:type model: System.Data.Entity.Infrastructure.DbCompiledModel
.. code-block:: csharp
public IdentityDbContext(DbCompiledModel model)
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>.IdentityDbContext(System.String)
:type nameOrConnectionString: System.String
.. code-block:: csharp
public IdentityDbContext(string nameOrConnectionString)
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>.IdentityDbContext(System.String, System.Data.Entity.Infrastructure.DbCompiledModel)
:type nameOrConnectionString: System.String
:type model: System.Data.Entity.Infrastructure.DbCompiledModel
.. code-block:: csharp
public IdentityDbContext(string nameOrConnectionString, DbCompiledModel model)Methods
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>.OnModelCreating(System.Data.Entity.DbModelBuilder)
:type modelBuilder: System.Data.Entity.DbModelBuilder
.. code-block:: csharp
protected override void OnModelCreating(DbModelBuilder modelBuilder)
.. dn:method:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>.ValidateEntity(System.Data.Entity.Infrastructure.DbEntityEntry, System.Collections.Generic.IDictionary<System.Object, System.Object>)
:type entityEntry: System.Data.Entity.Infrastructure.DbEntityEntry
:type items: System.Collections.Generic.IDictionary<System.Collections.Generic.IDictionary`2>{System.Object<System.Object>, System.Object<System.Object>}
:rtype: System.Data.Entity.Validation.DbEntityValidationResult
.. code-block:: csharp
protected override DbEntityValidationResult ValidateEntity(DbEntityEntry entityEntry, IDictionary<object, object> items)Properties
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim>.RoleClaims
:rtype: System.Data.Entity.IDbSet<System.Data.Entity.IDbSet`1>{TRoleClaim}
.. code-block:: csharp
public virtual IDbSet RoleClaims { get; set; }File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityRole/index.rst
IdentityRole Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.IdentityRole{System.String,Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityRole{System.String,Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityRole
Syntax
.. code-block:: csharp
public class IdentityRole : IdentityRole<string, IdentityUserRole>, IRole<string>.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole
Constructors
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole.IdentityRole()
Constructor
.. code-block:: csharp
public IdentityRole()
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole.IdentityRole(System.String)
Constructor
:type roleName: System.String
.. code-block:: csharp
public IdentityRole(string roleName)File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityRole-TKey-TUserRole/index.rst
IdentityRole Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.IdentityRole{{TKey},{TUserRole}} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityRole\<TKey, TUserRole>
Syntax
.. code-block:: csharp
public class IdentityRole<TKey, TUserRole> : IdentityRole<TKey, TUserRole>, IRole<TKey> where TUserRole : IdentityUserRole<TKey>.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole`2
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole<TKey, TUserRole>
Properties
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole<TKey, TUserRole>
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole<TKey, TUserRole>.Claims
Navigation property for claims in the role
:rtype: System.Collections.Generic.ICollection<System.Collections.Generic.ICollection`1>{Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim<Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim`1>{TKey}}
.. code-block:: csharp
public virtual ICollection> Claims { get; }
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole<TKey, TUserRole>.ConcurrencyStamp
Concurrency stamp
:rtype: System.String
.. code-block:: csharp
public virtual string ConcurrencyStamp { get; set; }
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityRole<TKey, TUserRole>.NormalizedName
Normalized role name
:rtype: System.String
.. code-block:: csharp
public virtual string NormalizedName { get; set; }File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityRoleClaim/index.rst
IdentityRoleClaim Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim{System.String} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim
Syntax
.. code-block:: csharp
public class IdentityRoleClaim : IdentityRoleClaim<string>.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim
File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityRoleClaim-TKey/index.rst
IdentityRoleClaim Class
EntityType that represents one specific role claimNamespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim\<TKey>
Syntax
.. code-block:: csharp
public class IdentityRoleClaim<TKey>.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim`1
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim
Properties
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim<TKey>.ClaimType
Claim type
:rtype: System.String
.. code-block:: csharp
public virtual string ClaimType { get; set; }
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim<TKey>.ClaimValue
Claim value
:rtype: System.String
.. code-block:: csharp
public virtual string ClaimValue { get; set; }
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim<TKey>.Id
Primary key
:rtype: System.Int32
.. code-block:: csharp
public virtual int Id { get; set; }
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim<TKey>.RoleId
User Id for the role this claim belongs to
:rtype: TKey
.. code-block:: csharp
public virtual TKey RoleId { get; set; }File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityUser/index.rst
IdentityUser Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.IdentityUser{System.String,Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin,Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole,Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityUser{System.String,Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin,Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole,Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityUser
Syntax
.. code-block:: csharp
public class IdentityUser : IdentityUser<string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim>, IUser<string>.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser
Constructors
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser.IdentityUser()
Constructor which creates a new Guid for the Id
.. code-block:: csharp
public IdentityUser()
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser.IdentityUser(System.String)
Constructor that takes a userName
:type userName: System.String
.. code-block:: csharp
public IdentityUser(string userName)File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityUser-TKey-TUserLogin-TUserRole-TUserClaim/index.rst
IdentityUser Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.IdentityUser{{TKey},{TUserLogin},{TUserRole},{TUserClaim}} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityUser\<TKey, TUserLogin, TUserRole, TUserClaim>
Syntax
.. code-block:: csharp
public class IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim> : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>, IUser<TKey> where TUserLogin : IdentityUserLogin<TKey> where TUserRole : IdentityUserRole<TKey> where TUserClaim : IdentityUserClaim<TKey>.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser`4
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
Properties
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>.ConcurrencyStamp
Concurrency stamp
:rtype: System.String
.. code-block:: csharp
public virtual string ConcurrencyStamp { get; set; }
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>.NormalizedEmail
Normalized email
:rtype: System.String
.. code-block:: csharp
public string NormalizedEmail { get; set; }
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>.NormalizedUserName
:rtype: System.String
.. code-block:: csharp
public string NormalizedUserName { get; set; }File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityUserLogin/index.rst
IdentityUserLogin Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin{System.String} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin{System.String} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin
Syntax
.. code-block:: csharp
public class IdentityUserLogin : IdentityUserLogin<string>.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin
File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/IdentityUserLogin-TKey/index.rst
IdentityUserLogin Class
Represents a login and its associated provider for a user.
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin{{TKey}} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin\<TKey>
Syntax
.. code-block:: csharp
public class IdentityUserLogin<TKey> : IdentityUserLogin<TKey>.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin`1
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin
Properties
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin<TKey>.ProviderDisplayName
Gets or sets the friendly name used in a UI for this login.
:rtype: System.String
.. code-block:: csharp
public virtual string ProviderDisplayName { get; set; }File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/UserStore-TUser/index.rst
UserStore Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.UserStore{{TUser},Microsoft.AspNet.Identity.CoreCompat.IdentityRole,System.String,Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin,Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole,Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.UserStore{{TUser},Microsoft.AspNet.Identity.CoreCompat.IdentityRole,System.String,Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin,Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole,Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.UserStore\<TUser>
Syntax
.. code-block:: csharp
public class UserStore<TUser> : UserStore<TUser, IdentityRole, string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim>, IUserLoginStore<TUser, string>, IUserClaimStore<TUser, string>, IUserRoleStore<TUser, string>, IUserPasswordStore<TUser, string>, IUserSecurityStampStore<TUser, string>, IQueryableUserStore<TUser, string>, IUserEmailStore<TUser, string>, IUserPhoneNumberStore<TUser, string>, IUserTwoFactorStore<TUser, string>, IUserLockoutStore<TUser, string>, IUserStore<TUser>, IUserStore<TUser, string>, IDisposable where TUser : IdentityUser.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.UserStore`1
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.UserStore
Constructors
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.UserStore
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.UserStore<TUser>.UserStore()
Default constuctor which uses a new instance of a default EntityyDbContext
.. code-block:: csharp
public UserStore()
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.UserStore<TUser>.UserStore(System.Data.Entity.DbContext)
Constructor
:type context: System.Data.Entity.DbContext
.. code-block:: csharp
public UserStore(DbContext context)File: api/autoapi/Microsoft/AspNet/Identity/CoreCompat/UserStore-TUser-TRole-TKey-TUserLogin-TUserRole-TUserClaim/index.rst
UserStore Class
Namespace
:dn:ns:Microsoft.AspNet.Identity.CoreCompat
Assemblies
* Microsoft.AspNet.Identity.AspNetCoreCompat
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNet.Identity.EntityFramework.UserStore{{TUser},{TRole},{TKey},{TUserLogin},{TUserRole},{TUserClaim}} - :dn:cls:
Microsoft.AspNet.Identity.CoreCompat.UserStore\<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
Syntax
.. code-block:: csharp
public class UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> : UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>, IUserLoginStore<TUser, TKey>, IUserClaimStore<TUser, TKey>, IUserRoleStore<TUser, TKey>, IUserPasswordStore<TUser, TKey>, IUserSecurityStampStore<TUser, TKey>, IQueryableUserStore<TUser, TKey>, IUserEmailStore<TUser, TKey>, IUserPhoneNumberStore<TUser, TKey>, IUserTwoFactorStore<TUser, TKey>, IUserLockoutStore<TUser, TKey>, IUserStore<TUser, TKey>, IDisposable where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim> where TRole : IdentityRole<TKey, TUserRole> where TKey : IEquatable<TKey> where TUserLogin : IdentityUserLogin<TKey>, new ()where TUserRole : IdentityUserRole<TKey>, new ()where TUserClaim : IdentityUserClaim<TKey>, new ().. dn:class:: Microsoft.AspNet.Identity.CoreCompat.UserStore`6
:hidden:
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
Constructors
.. dn:class:: Microsoft.AspNet.Identity.CoreCompat.UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNet.Identity.CoreCompat.UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.UserStore(System.Data.Entity.DbContext)
Constructor
:type context: System.Data.Entity.DbContext
.. code-block:: csharp
public UserStore(DbContext context)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/index.rst
Microsoft.AspNetCore.Antiforgery Namespace
.. toctree::
:hidden:
:maxdepth: 2
/autoapi/Microsoft/AspNetCore/Antiforgery/AntiforgeryOptions/index
/autoapi/Microsoft/AspNetCore/Antiforgery/AntiforgeryTokenSet/index
/autoapi/Microsoft/AspNetCore/Antiforgery/AntiforgeryValidationException/index
/autoapi/Microsoft/AspNetCore/Antiforgery/IAntiforgery/index
/autoapi/Microsoft/AspNetCore/Antiforgery/IAntiforgeryAdditionalDataProvider/index
.. toctree::
:hidden:
:maxdepth: 2
.. dn:namespace:: Microsoft.AspNetCore.Antiforgery
.. rubric:: Interfaces
interface :dn:iface:`IAntiforgery`
.. object: type=interface name=Microsoft.AspNetCore.Antiforgery.IAntiforgery
Provides access to the antiforgery system, which provides protection against
Cross-site Request Forgery (XSRF, also called CSRF) attacks.
interface :dn:iface:`IAntiforgeryAdditionalDataProvider`
.. object: type=interface name=Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider
Allows providing or validating additional custom data for antiforgery tokens.
For example, the developer could use this to supply a nonce when the token is
generated, then he could validate the nonce when the token is validated.
.. rubric:: Classes
class :dn:cls:`AntiforgeryOptions`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions
Provides programmatic configuration for the antiforgery token system.
class :dn:cls:`AntiforgeryTokenSet`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
The antiforgery token pair (cookie and request token) for a request.
class :dn:cls:`AntiforgeryValidationException`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException
The :any:`System.Exception` that is thrown when the antiforgery token validation fails.File: api/autoapi/Microsoft/AspNetCore/Antiforgery/AntiforgeryOptions/index.rst
AntiforgeryOptions Class
Provides programmatic configuration for the antiforgery token system.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions
Syntax
.. code-block:: csharp
public class AntiforgeryOptions.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions
Properties
.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.CookieName
Specifies the name of the cookie that is used by the antiforgery system.
:rtype: System.String
.. code-block:: csharp
public string CookieName { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.FormFieldName
Specifies the name of the antiforgery token field that is used by the antiforgery system.
:rtype: System.String
.. code-block:: csharp
public string FormFieldName { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.HeaderName
Specifies the name of the header value that is used by the antiforgery system. If `null` then
antiforgery validation will only consider form data.
:rtype: System.String
.. code-block:: csharp
public string HeaderName { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.RequireSsl
Specifies whether SSL is required for the antiforgery system
to operate. If this setting is 'true' and a non-SSL request
comes into the system, all antiforgery APIs will fail.
:rtype: System.Boolean
.. code-block:: csharp
public bool RequireSsl { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.SuppressXFrameOptionsHeader
Specifies whether to suppress the generation of X-Frame-Options header
which is used to prevent ClickJacking. By default, the X-Frame-Options
header is generated with the value SAMEORIGIN. If this setting is 'true',
the X-Frame-Options header will not be generated for the response.
:rtype: System.Boolean
.. code-block:: csharp
public bool SuppressXFrameOptionsHeader { get; set; }Fields
.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions
:noindex:
:hidden:
.. dn:field:: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions.DefaultCookiePrefix
The default cookie prefix, which is ".AspNetCore.Antiforgery.".
:rtype: System.String
.. code-block:: csharp
public static readonly string DefaultCookiePrefixFile: api/autoapi/Microsoft/AspNetCore/Antiforgery/AntiforgeryTokenSet/index.rst
AntiforgeryTokenSet Class
The antiforgery token pair (cookie and request token) for a request.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
Syntax
.. code-block:: csharp
public class AntiforgeryTokenSet.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
Constructors
.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet.AntiforgeryTokenSet(System.String, System.String, System.String, System.String)
Creates the antiforgery token pair (cookie and request token) for a request.
:param requestToken: The token that is supplied in the request.
:type requestToken: System.String
:param cookieToken: The token that is supplied in the request cookie.
:type cookieToken: System.String
:param formFieldName: The name of the form field used for the request token.
:type formFieldName: System.String
:param headerName: The name of the header used for the request token.
:type headerName: System.String
.. code-block:: csharp
public AntiforgeryTokenSet(string requestToken, string cookieToken, string formFieldName, string headerName)Properties
.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet.CookieToken
Gets the cookie token.
:rtype: System.String
.. code-block:: csharp
public string CookieToken { get; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet.FormFieldName
Gets the name of the form field used for the request token.
:rtype: System.String
.. code-block:: csharp
public string FormFieldName { get; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet.HeaderName
Gets the name of the header used for the request token.
:rtype: System.String
.. code-block:: csharp
public string HeaderName { get; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet.RequestToken
Gets the request token.
:rtype: System.String
.. code-block:: csharp
public string RequestToken { get; }File: api/autoapi/Microsoft/AspNetCore/Antiforgery/AntiforgeryValidationException/index.rst
AntiforgeryValidationException Class
The :any:System.Exception that is thrown when the antiforgery token validation fails.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
System.Exception - :dn:cls:
Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException
Syntax
.. code-block:: csharp
public class AntiforgeryValidationException : Exception.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException
Constructors
.. dn:class:: Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException.AntiforgeryValidationException(System.String)
Creates a new instance of :any:`Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException` with the specified
exception *message*.
:param message: The message that describes the error.
:type message: System.String
.. code-block:: csharp
public AntiforgeryValidationException(string message)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/IAntiforgery/index.rst
IAntiforgery Interface
Provides access to the antiforgery system, which provides protection against
Cross-site Request Forgery (XSRF, also called CSRF) attacks.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Syntax
.. code-block:: csharp
public interface IAntiforgery.. dn:interface:: Microsoft.AspNetCore.Antiforgery.IAntiforgery
:hidden:
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.IAntiforgery
Methods
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.IAntiforgery
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.IAntiforgery.GetAndStoreTokens(Microsoft.AspNetCore.Http.HttpContext)
Generates an :any:`Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet` for this request and stores the cookie token
in the response.
:param httpContext: The :any:`Microsoft.AspNetCore.Http.HttpContext` associated with the current request.
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
:return: An :any:`Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet` with tokens for the response.
.. code-block:: csharp
AntiforgeryTokenSet GetAndStoreTokens(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.IAntiforgery.GetTokens(Microsoft.AspNetCore.Http.HttpContext)
Generates an :any:`Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet` for this request.
:param httpContext: The :any:`Microsoft.AspNetCore.Http.HttpContext` associated with the current request.
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
.. code-block:: csharp
AntiforgeryTokenSet GetTokens(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.IAntiforgery.IsRequestValidAsync(Microsoft.AspNetCore.Http.HttpContext)
Asynchronously returns a value indicating whether the request passes antiforgery validation. If the
request uses a safe HTTP method (GET, HEAD, OPTIONS, TRACE), the antiforgery token is not validated.
:param httpContext: The :any:`Microsoft.AspNetCore.Http.HttpContext` associated with the current request.
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{System.Boolean<System.Boolean>}
:return:
A :any:`System.Threading.Tasks.Task\`1` that, when completed, returns `true` if the is requst uses a safe HTTP
method or contains a value antiforgery token, otherwise returns `false`.
.. code-block:: csharp
Task IsRequestValidAsync(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.IAntiforgery.SetCookieTokenAndHeader(Microsoft.AspNetCore.Http.HttpContext)
Generates and stores an antiforgery cookie token if one is not available or not valid.
:param httpContext: The :any:`Microsoft.AspNetCore.Http.HttpContext` associated with the current request.
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
.. code-block:: csharp
void SetCookieTokenAndHeader(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.IAntiforgery.ValidateRequestAsync(Microsoft.AspNetCore.Http.HttpContext)
Validates an antiforgery token that was supplied as part of the request.
:param httpContext: The :any:`Microsoft.AspNetCore.Http.HttpContext` associated with the current request.
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
Task ValidateRequestAsync(HttpContext httpContext)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/IAntiforgeryAdditionalDataProvider/index.rst
IAntiforgeryAdditionalDataProvider Interface
Allows providing or validating additional custom data for antiforgery tokens.
For example, the developer could use this to supply a nonce when the token is
generated, then he could validate the nonce when the token is validated.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Syntax
.. code-block:: csharp
public interface IAntiforgeryAdditionalDataProvider.. dn:interface:: Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider
:hidden:
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider
Methods
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider.GetAdditionalData(Microsoft.AspNetCore.Http.HttpContext)
Provides additional data to be stored for the antiforgery tokens generated
during this request.
:param context: Information about the current request.
:type context: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.String
:return: Supplemental data to embed within the antiforgery token.
.. code-block:: csharp
string GetAdditionalData(HttpContext context)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider.ValidateAdditionalData(Microsoft.AspNetCore.Http.HttpContext, System.String)
Validates additional data that was embedded inside an incoming antiforgery
token.
:param context: Information about the current request.
:type context: Microsoft.AspNetCore.Http.HttpContext
:param additionalData: Supplemental data that was embedded within the token.
:type additionalData: System.String
:rtype: System.Boolean
:return: True if the data is valid; false if the data is invalid.
.. code-block:: csharp
bool ValidateAdditionalData(HttpContext context, string additionalData)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/index.rst
Microsoft.AspNetCore.Antiforgery.Internal Namespace
.. toctree::
:hidden:
:maxdepth: 2
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgeryFeature/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgeryOptionsSetup/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgerySerializationContext/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgerySerializationContextPooledObjectPolicy/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgeryToken/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/BinaryBlob/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgery/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgeryAdditionalDataProvider/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgeryTokenGenerator/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgeryTokenSerializer/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgeryTokenStore/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultClaimUidExtractor/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IAntiforgeryFeature/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IAntiforgeryTokenGenerator/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IAntiforgeryTokenSerializer/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IAntiforgeryTokenStore/index
/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IClaimUidExtractor/index
.. toctree::
:hidden:
:maxdepth: 2
.. dn:namespace:: Microsoft.AspNetCore.Antiforgery.Internal
.. rubric:: Interfaces
interface :dn:iface:`IAntiforgeryFeature`
.. object: type=interface name=Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature
interface :dn:iface:`IAntiforgeryTokenGenerator`
.. object: type=interface name=Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator
Generates and validates antiforgery tokens.
interface :dn:iface:`IAntiforgeryTokenSerializer`
.. object: type=interface name=Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenSerializer
interface :dn:iface:`IAntiforgeryTokenStore`
.. object: type=interface name=Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore
interface :dn:iface:`IClaimUidExtractor`
.. object: type=interface name=Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor
This interface can extract unique identifers for a :any:`System.Security.Claims.ClaimsPrincipal`\.
.. rubric:: Classes
class :dn:cls:`AntiforgeryFeature`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature
Used to hold per-request state.
class :dn:cls:`AntiforgeryOptionsSetup`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryOptionsSetup
class :dn:cls:`AntiforgerySerializationContext`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext
class :dn:cls:`AntiforgerySerializationContextPooledObjectPolicy`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContextPooledObjectPolicy
class :dn:cls:`AntiforgeryToken`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
class :dn:cls:`BinaryBlob`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
class :dn:cls:`DefaultAntiforgery`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery
Provides access to the antiforgery system, which provides protection against
Cross-site Request Forgery (XSRF, also called CSRF) attacks.
class :dn:cls:`DefaultAntiforgeryAdditionalDataProvider`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryAdditionalDataProvider
A default :any:`Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider` implementation.
class :dn:cls:`DefaultAntiforgeryTokenGenerator`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator
class :dn:cls:`DefaultAntiforgeryTokenSerializer`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer
class :dn:cls:`DefaultAntiforgeryTokenStore`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore
class :dn:cls:`DefaultClaimUidExtractor`
.. object: type=class name=Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor
Default implementation of :any:`Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor`\.File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgeryFeature/index.rst
AntiforgeryFeature Class
Used to hold per-request state.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature
Syntax
.. code-block:: csharp
public class AntiforgeryFeature : IAntiforgeryFeature.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature
Properties
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.CookieToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
public AntiforgeryToken CookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.HaveDeserializedCookieToken
:rtype: System.Boolean
.. code-block:: csharp
public bool HaveDeserializedCookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.HaveDeserializedRequestToken
:rtype: System.Boolean
.. code-block:: csharp
public bool HaveDeserializedRequestToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.HaveGeneratedNewCookieToken
:rtype: System.Boolean
.. code-block:: csharp
public bool HaveGeneratedNewCookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.HaveStoredNewCookieToken
:rtype: System.Boolean
.. code-block:: csharp
public bool HaveStoredNewCookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.NewCookieToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
public AntiforgeryToken NewCookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.NewCookieTokenString
:rtype: System.String
.. code-block:: csharp
public string NewCookieTokenString { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.NewRequestToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
public AntiforgeryToken NewRequestToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.NewRequestTokenString
:rtype: System.String
.. code-block:: csharp
public string NewRequestTokenString { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryFeature.RequestToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
public AntiforgeryToken RequestToken { get; set; }File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgeryOptionsSetup/index.rst
AntiforgeryOptionsSetup Class
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.Extensions.Options.ConfigureOptions{Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions} - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryOptionsSetup
Syntax
.. code-block:: csharp
public class AntiforgeryOptionsSetup : ConfigureOptions<AntiforgeryOptions>, IConfigureOptions<AntiforgeryOptions>.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryOptionsSetup
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryOptionsSetup
Constructors
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryOptionsSetup
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryOptionsSetup.AntiforgeryOptionsSetup(Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.DataProtection.DataProtectionOptions>)
:type dataProtectionOptionsAccessor: Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Options.IOptions`1>{Microsoft.AspNetCore.DataProtection.DataProtectionOptions<Microsoft.AspNetCore.DataProtection.DataProtectionOptions>}
.. code-block:: csharp
public AntiforgeryOptionsSetup(IOptions<DataProtectionOptions> dataProtectionOptionsAccessor)Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryOptionsSetup
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryOptionsSetup.ConfigureOptions(Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions, Microsoft.AspNetCore.DataProtection.DataProtectionOptions)
:type options: Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions
:type dataProtectionOptions: Microsoft.AspNetCore.DataProtection.DataProtectionOptions
.. code-block:: csharp
public static void ConfigureOptions(AntiforgeryOptions options, DataProtectionOptions dataProtectionOptions)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgerySerializationContext/index.rst
AntiforgerySerializationContext Class
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext
Syntax
.. code-block:: csharp
public class AntiforgerySerializationContext.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext
Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext.GetChars(System.Int32)
:type count: System.Int32
:rtype: System.Char<System.Char>[]
.. code-block:: csharp
public char[] GetChars(int count)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext.Reset()
.. code-block:: csharp
public void Reset()Properties
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext.Reader
:rtype: System.IO.BinaryReader
.. code-block:: csharp
public BinaryReader Reader { get; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext.Sha256
:rtype: System.Security.Cryptography.SHA256
.. code-block:: csharp
public SHA256 Sha256 { get; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext.Stream
:rtype: System.IO.MemoryStream
.. code-block:: csharp
public MemoryStream Stream { get; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext.Writer
:rtype: System.IO.BinaryWriter
.. code-block:: csharp
public BinaryWriter Writer { get; }File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgerySerializationContextPooledObjectPolicy/index.rst
AntiforgerySerializationContextPooledObjectPolicy Class
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContextPooledObjectPolicy
Syntax
.. code-block:: csharp
public class AntiforgerySerializationContextPooledObjectPolicy : IPooledObjectPolicy<AntiforgerySerializationContext>.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContextPooledObjectPolicy
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContextPooledObjectPolicy
Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContextPooledObjectPolicy
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContextPooledObjectPolicy.Create()
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext
.. code-block:: csharp
public AntiforgerySerializationContext Create()
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContextPooledObjectPolicy.Return(Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext)
:type obj: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext
:rtype: System.Boolean
.. code-block:: csharp
public bool Return(AntiforgerySerializationContext obj)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/AntiforgeryToken/index.rst
AntiforgeryToken Class
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
Syntax
.. code-block:: csharp
public sealed class AntiforgeryToken.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
Properties
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken.AdditionalData
:rtype: System.String
.. code-block:: csharp
public string AdditionalData { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken.ClaimUid
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
.. code-block:: csharp
public BinaryBlob ClaimUid { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken.IsCookieToken
:rtype: System.Boolean
.. code-block:: csharp
public bool IsCookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken.SecurityToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
.. code-block:: csharp
public BinaryBlob SecurityToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken.Username
:rtype: System.String
.. code-block:: csharp
public string Username { get; set; }File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/BinaryBlob/index.rst
BinaryBlob Class
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
Syntax
.. code-block:: csharp
[DebuggerDisplay("{DebuggerString}")]
public sealed class BinaryBlob : IEquatable.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
Constructors
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob.BinaryBlob(System.Int32)
:type bitLength: System.Int32
.. code-block:: csharp
public BinaryBlob(int bitLength)
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob.BinaryBlob(System.Int32, System.Byte[])
:type bitLength: System.Int32
:type data: System.Byte<System.Byte>[]
.. code-block:: csharp
public BinaryBlob(int bitLength, byte[] data)Properties
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob.BitLength
:rtype: System.Int32
.. code-block:: csharp
public int BitLength { get; }Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob.Equals(Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob)
:type other: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob
:rtype: System.Boolean
.. code-block:: csharp
public bool Equals(BinaryBlob other)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob.Equals(System.Object)
:type obj: System.Object
:rtype: System.Boolean
.. code-block:: csharp
public override bool Equals(object obj)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob.GetData()
:rtype: System.Byte<System.Byte>[]
.. code-block:: csharp
public byte[] GetData()
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.BinaryBlob.GetHashCode()
:rtype: System.Int32
.. code-block:: csharp
public override int GetHashCode()File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgery/index.rst
DefaultAntiforgery Class
Provides access to the antiforgery system, which provides protection against
Cross-site Request Forgery (XSRF, also called CSRF) attacks.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery
Syntax
.. code-block:: csharp
public class DefaultAntiforgery : IAntiforgery.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery
Constructors
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.DefaultAntiforgery(Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions>, Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator, Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenSerializer, Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore, Microsoft.Extensions.Logging.ILoggerFactory)
:type antiforgeryOptionsAccessor: Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Options.IOptions`1>{Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions<Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions>}
:type tokenGenerator: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator
:type tokenSerializer: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenSerializer
:type tokenStore: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore
:type loggerFactory: Microsoft.Extensions.Logging.ILoggerFactory
.. code-block:: csharp
public DefaultAntiforgery(IOptions<AntiforgeryOptions> antiforgeryOptionsAccessor, IAntiforgeryTokenGenerator tokenGenerator, IAntiforgeryTokenSerializer tokenSerializer, IAntiforgeryTokenStore tokenStore, ILoggerFactory loggerFactory)Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.GetAndStoreTokens(Microsoft.AspNetCore.Http.HttpContext)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
.. code-block:: csharp
public AntiforgeryTokenSet GetAndStoreTokens(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.GetTokens(Microsoft.AspNetCore.Http.HttpContext)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet
.. code-block:: csharp
public AntiforgeryTokenSet GetTokens(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.IsRequestValidAsync(Microsoft.AspNetCore.Http.HttpContext)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{System.Boolean<System.Boolean>}
.. code-block:: csharp
public Task IsRequestValidAsync(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.SetCookieTokenAndHeader(Microsoft.AspNetCore.Http.HttpContext)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
.. code-block:: csharp
public void SetCookieTokenAndHeader(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.ValidateRequestAsync(Microsoft.AspNetCore.Http.HttpContext)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task ValidateRequestAsync(HttpContext httpContext)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgeryAdditionalDataProvider/index.rst
DefaultAntiforgeryAdditionalDataProvider Class
A default :any:Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider implementation.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryAdditionalDataProvider
Syntax
.. code-block:: csharp
public class DefaultAntiforgeryAdditionalDataProvider : IAntiforgeryAdditionalDataProvider.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryAdditionalDataProvider
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryAdditionalDataProvider
Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryAdditionalDataProvider
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryAdditionalDataProvider.GetAdditionalData(Microsoft.AspNetCore.Http.HttpContext)
:type context: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.String
.. code-block:: csharp
public virtual string GetAdditionalData(HttpContext context)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryAdditionalDataProvider.ValidateAdditionalData(Microsoft.AspNetCore.Http.HttpContext, System.String)
:type context: Microsoft.AspNetCore.Http.HttpContext
:type additionalData: System.String
:rtype: System.Boolean
.. code-block:: csharp
public virtual bool ValidateAdditionalData(HttpContext context, string additionalData)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgeryTokenGenerator/index.rst
DefaultAntiforgeryTokenGenerator Class
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator
Syntax
.. code-block:: csharp
public class DefaultAntiforgeryTokenGenerator : IAntiforgeryTokenGenerator.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator
Constructors
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator.DefaultAntiforgeryTokenGenerator(Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor, Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider)
:type claimUidExtractor: Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor
:type additionalDataProvider: Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider
.. code-block:: csharp
public DefaultAntiforgeryTokenGenerator(IClaimUidExtractor claimUidExtractor, IAntiforgeryAdditionalDataProvider additionalDataProvider)Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator.GenerateCookieToken()
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
public AntiforgeryToken GenerateCookieToken()
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator.GenerateRequestToken(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:type cookieToken: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
public AntiforgeryToken GenerateRequestToken(HttpContext httpContext, AntiforgeryToken cookieToken)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator.IsCookieTokenValid(Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken)
:type cookieToken: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:rtype: System.Boolean
.. code-block:: csharp
public bool IsCookieTokenValid(AntiforgeryToken cookieToken)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenGenerator.TryValidateTokenSet(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken, Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken, out System.String)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:type cookieToken: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:type requestToken: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:type message: System.String
:rtype: System.Boolean
.. code-block:: csharp
public bool TryValidateTokenSet(HttpContext httpContext, AntiforgeryToken cookieToken, AntiforgeryToken requestToken, out string message)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgeryTokenSerializer/index.rst
DefaultAntiforgeryTokenSerializer Class
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer
Syntax
.. code-block:: csharp
public class DefaultAntiforgeryTokenSerializer : IAntiforgeryTokenSerializer.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer
Constructors
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.DefaultAntiforgeryTokenSerializer(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider, Microsoft.Extensions.ObjectPool.ObjectPool<Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext>)
:type provider: Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
:type pool: Microsoft.Extensions.ObjectPool.ObjectPool<Microsoft.Extensions.ObjectPool.ObjectPool`1>{Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext<Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext>}
.. code-block:: csharp
public DefaultAntiforgeryTokenSerializer(IDataProtectionProvider provider, ObjectPool<AntiforgerySerializationContext> pool)Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(System.String)
:type serializedToken: System.String
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
public AntiforgeryToken Deserialize(string serializedToken)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Serialize(Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken)
:type token: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:rtype: System.String
.. code-block:: csharp
public string Serialize(AntiforgeryToken token)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultAntiforgeryTokenStore/index.rst
DefaultAntiforgeryTokenStore Class
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore
Syntax
.. code-block:: csharp
public class DefaultAntiforgeryTokenStore : IAntiforgeryTokenStore.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore
Constructors
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore.DefaultAntiforgeryTokenStore(Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions>)
:type optionsAccessor: Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Options.IOptions`1>{Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions<Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions>}
.. code-block:: csharp
public DefaultAntiforgeryTokenStore(IOptions<AntiforgeryOptions> optionsAccessor)Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore.GetCookieToken(Microsoft.AspNetCore.Http.HttpContext)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.String
.. code-block:: csharp
public string GetCookieToken(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore.GetRequestTokensAsync(Microsoft.AspNetCore.Http.HttpContext)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet<Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet>}
.. code-block:: csharp
public Task<AntiforgeryTokenSet> GetRequestTokensAsync(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore.SaveCookieToken(Microsoft.AspNetCore.Http.HttpContext, System.String)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:type token: System.String
.. code-block:: csharp
public void SaveCookieToken(HttpContext httpContext, string token)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/DefaultClaimUidExtractor/index.rst
DefaultClaimUidExtractor Class
Default implementation of :any:Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor
Syntax
.. code-block:: csharp
public class DefaultClaimUidExtractor : IClaimUidExtractor.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor
:hidden:
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor
Constructors
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor.DefaultClaimUidExtractor(Microsoft.Extensions.ObjectPool.ObjectPool<Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext>)
:type pool: Microsoft.Extensions.ObjectPool.ObjectPool<Microsoft.Extensions.ObjectPool.ObjectPool`1>{Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext<Microsoft.AspNetCore.Antiforgery.Internal.AntiforgerySerializationContext>}
.. code-block:: csharp
public DefaultClaimUidExtractor(ObjectPool<AntiforgerySerializationContext> pool)Methods
.. dn:class:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor.ExtractClaimUid(System.Security.Claims.ClaimsPrincipal)
:type claimsPrincipal: System.Security.Claims.ClaimsPrincipal
:rtype: System.String
.. code-block:: csharp
public string ExtractClaimUid(ClaimsPrincipal claimsPrincipal)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.DefaultClaimUidExtractor.GetUniqueIdentifierParameters(System.Collections.Generic.IEnumerable<System.Security.Claims.ClaimsIdentity>)
:type claimsIdentities: System.Collections.Generic.IEnumerable<System.Collections.Generic.IEnumerable`1>{System.Security.Claims.ClaimsIdentity<System.Security.Claims.ClaimsIdentity>}
:rtype: System.Collections.Generic.IList<System.Collections.Generic.IList`1>{System.String<System.String>}
.. code-block:: csharp
public static IList<string> GetUniqueIdentifierParameters(IEnumerable<ClaimsIdentity> claimsIdentities)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IAntiforgeryFeature/index.rst
IAntiforgeryFeature Interface
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Syntax
.. code-block:: csharp
public interface IAntiforgeryFeature.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature
:hidden:
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature
Properties
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.CookieToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
AntiforgeryToken CookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.HaveDeserializedCookieToken
:rtype: System.Boolean
.. code-block:: csharp
bool HaveDeserializedCookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.HaveDeserializedRequestToken
:rtype: System.Boolean
.. code-block:: csharp
bool HaveDeserializedRequestToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.HaveGeneratedNewCookieToken
:rtype: System.Boolean
.. code-block:: csharp
bool HaveGeneratedNewCookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.HaveStoredNewCookieToken
:rtype: System.Boolean
.. code-block:: csharp
bool HaveStoredNewCookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.NewCookieToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
AntiforgeryToken NewCookieToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.NewCookieTokenString
:rtype: System.String
.. code-block:: csharp
string NewCookieTokenString { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.NewRequestToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
AntiforgeryToken NewRequestToken { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.NewRequestTokenString
:rtype: System.String
.. code-block:: csharp
string NewRequestTokenString { get; set; }
.. dn:property:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryFeature.RequestToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
AntiforgeryToken RequestToken { get; set; }File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IAntiforgeryTokenGenerator/index.rst
IAntiforgeryTokenGenerator Interface
Generates and validates antiforgery tokens.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Syntax
.. code-block:: csharp
public interface IAntiforgeryTokenGenerator.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator
:hidden:
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator
Methods
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator.GenerateCookieToken()
Generates a new random cookie token.
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:return: An :any:`Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken`\.
.. code-block:: csharp
AntiforgeryToken GenerateCookieToken()
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator.GenerateRequestToken(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken)
Generates a request token corresponding to *cookieToken*.
:param httpContext: The :any:`Microsoft.AspNetCore.Http.HttpContext` associated with the current request.
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:param cookieToken: A valid cookie token.
:type cookieToken: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:return: An :any:`Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken`\.
.. code-block:: csharp
AntiforgeryToken GenerateRequestToken(HttpContext httpContext, AntiforgeryToken cookieToken)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator.IsCookieTokenValid(Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken)
Attempts to validate a cookie token.
:param cookieToken: A valid cookie token.
:type cookieToken: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:rtype: System.Boolean
:return: `true` if the cookie token is valid, otherwise `false`.
.. code-block:: csharp
bool IsCookieTokenValid(AntiforgeryToken cookieToken)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenGenerator.TryValidateTokenSet(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken, Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken, out System.String)
Attempts to validate a cookie and request token set for the given *httpContext*.
:param httpContext: The :any:`Microsoft.AspNetCore.Http.HttpContext` associated with the current request.
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:param cookieToken: A cookie token.
:type cookieToken: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:param requestToken: A request token.
:type requestToken: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:param message:
Will be set to the validation message if the tokens are invalid, otherwise `null`.
:type message: System.String
:rtype: System.Boolean
:return: `true` if the tokens are valid, otherwise `false`.
.. code-block:: csharp
bool TryValidateTokenSet(HttpContext httpContext, AntiforgeryToken cookieToken, AntiforgeryToken requestToken, out string message)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IAntiforgeryTokenSerializer/index.rst
IAntiforgeryTokenSerializer Interface
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Syntax
.. code-block:: csharp
public interface IAntiforgeryTokenSerializer.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenSerializer
:hidden:
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenSerializer
Methods
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenSerializer
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenSerializer.Deserialize(System.String)
:type serializedToken: System.String
:rtype: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
.. code-block:: csharp
AntiforgeryToken Deserialize(string serializedToken)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenSerializer.Serialize(Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken)
:type token: Microsoft.AspNetCore.Antiforgery.Internal.AntiforgeryToken
:rtype: System.String
.. code-block:: csharp
string Serialize(AntiforgeryToken token)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IAntiforgeryTokenStore/index.rst
IAntiforgeryTokenStore Interface
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Syntax
.. code-block:: csharp
public interface IAntiforgeryTokenStore.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore
:hidden:
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore
Methods
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore.GetCookieToken(Microsoft.AspNetCore.Http.HttpContext)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.String
.. code-block:: csharp
string GetCookieToken(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore.GetRequestTokensAsync(Microsoft.AspNetCore.Http.HttpContext)
Gets the cookie and request tokens from the request.
:param httpContext: The :any:`Microsoft.AspNetCore.Http.HttpContext` for the current request.
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet<Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet>}
:return: The :any:`Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet`\.
.. code-block:: csharp
Task<AntiforgeryTokenSet> GetRequestTokensAsync(HttpContext httpContext)
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IAntiforgeryTokenStore.SaveCookieToken(Microsoft.AspNetCore.Http.HttpContext, System.String)
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
:type token: System.String
.. code-block:: csharp
void SaveCookieToken(HttpContext httpContext, string token)File: api/autoapi/Microsoft/AspNetCore/Antiforgery/Internal/IClaimUidExtractor/index.rst
IClaimUidExtractor Interface
This interface can extract unique identifers for a :any:System.Security.Claims.ClaimsPrincipal.
Namespace
:dn:ns:Microsoft.AspNetCore.Antiforgery.Internal
Assemblies
* Microsoft.AspNetCore.Antiforgery
.. contents::
:local:
Syntax
.. code-block:: csharp
public interface IClaimUidExtractor.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor
:hidden:
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor
Methods
.. dn:interface:: Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Antiforgery.Internal.IClaimUidExtractor.ExtractClaimUid(System.Security.Claims.ClaimsPrincipal)
Extracts claims identifier.
:param claimsPrincipal: The :any:`System.Security.Claims.ClaimsPrincipal`\.
:type claimsPrincipal: System.Security.Claims.ClaimsPrincipal
:rtype: System.String
:return: The claims identifier.
.. code-block:: csharp
string ExtractClaimUid(ClaimsPrincipal claimsPrincipal)File: api/autoapi/Microsoft/AspNetCore/Authentication/index.rst
Microsoft.AspNetCore.Authentication Namespace
.. toctree::
:hidden:
:maxdepth: 2
/autoapi/Microsoft/AspNetCore/Authentication/AuthenticateResult/index
/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationHandler-TOptions/index
/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationMiddleware-TOptions/index
/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationTicket/index
/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationToken/index
/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationTokenExtensions/index
/autoapi/Microsoft/AspNetCore/Authentication/Base64UrlTextEncoder/index
/autoapi/Microsoft/AspNetCore/Authentication/BaseContext/index
/autoapi/Microsoft/AspNetCore/Authentication/BaseControlContext/index
/autoapi/Microsoft/AspNetCore/Authentication/ClaimsTransformationContext/index
/autoapi/Microsoft/AspNetCore/Authentication/ClaimsTransformationHandler/index
/autoapi/Microsoft/AspNetCore/Authentication/ClaimsTransformationMiddleware/index
/autoapi/Microsoft/AspNetCore/Authentication/ClaimsTransformer/index
/autoapi/Microsoft/AspNetCore/Authentication/EventResultState/index
/autoapi/Microsoft/AspNetCore/Authentication/FailureContext/index
/autoapi/Microsoft/AspNetCore/Authentication/IClaimsTransformer/index
/autoapi/Microsoft/AspNetCore/Authentication/IDataSerializer-TModel/index
/autoapi/Microsoft/AspNetCore/Authentication/IRemoteAuthenticationEvents/index
/autoapi/Microsoft/AspNetCore/Authentication/ISecureDataFormat-TData/index
/autoapi/Microsoft/AspNetCore/Authentication/ISystemClock/index
/autoapi/Microsoft/AspNetCore/Authentication/PropertiesDataFormat/index
/autoapi/Microsoft/AspNetCore/Authentication/PropertiesSerializer/index
/autoapi/Microsoft/AspNetCore/Authentication/RemoteAuthenticationEvents/index
/autoapi/Microsoft/AspNetCore/Authentication/RemoteAuthenticationHandler-TOptions/index
/autoapi/Microsoft/AspNetCore/Authentication/SecureDataFormat-TData/index
/autoapi/Microsoft/AspNetCore/Authentication/SharedAuthenticationOptions/index
/autoapi/Microsoft/AspNetCore/Authentication/SystemClock/index
/autoapi/Microsoft/AspNetCore/Authentication/TicketDataFormat/index
/autoapi/Microsoft/AspNetCore/Authentication/TicketReceivedContext/index
/autoapi/Microsoft/AspNetCore/Authentication/TicketSerializer/index
.. toctree::
:hidden:
:maxdepth: 2
.. dn:namespace:: Microsoft.AspNetCore.Authentication
.. rubric:: Interfaces
interface :dn:iface:`IClaimsTransformer`
.. object: type=interface name=Microsoft.AspNetCore.Authentication.IClaimsTransformer
Used for claims transformation.
interface :dn:iface:`IDataSerializer\<TModel>`
.. object: type=interface name=Microsoft.AspNetCore.Authentication.IDataSerializer\<TModel>
interface :dn:iface:`IRemoteAuthenticationEvents`
.. object: type=interface name=Microsoft.AspNetCore.Authentication.IRemoteAuthenticationEvents
interface :dn:iface:`ISecureDataFormat\`
.. object: type=interface name=Microsoft.AspNetCore.Authentication.ISecureDataFormat\
interface :dn:iface:`ISystemClock`
.. object: type=interface name=Microsoft.AspNetCore.Authentication.ISystemClock
Abstracts the system clock to facilitate testing.
.. rubric:: Classes
class :dn:cls:`AuthenticateResult`
.. object: type=class name=Microsoft.AspNetCore.Authentication.AuthenticateResult
Contains the result of an Authenticate call
class :dn:cls:`AuthenticationHandler\<TOptions>`
.. object: type=class name=Microsoft.AspNetCore.Authentication.AuthenticationHandler\<TOptions>
Base class for the per-request work performed by most authentication middleware.
class :dn:cls:`AuthenticationMiddleware\<TOptions>`
.. object: type=class name=Microsoft.AspNetCore.Authentication.AuthenticationMiddleware\<TOptions>
class :dn:cls:`AuthenticationTicket`
.. object: type=class name=Microsoft.AspNetCore.Authentication.AuthenticationTicket
Contains user identity information as well as additional authentication state.
class :dn:cls:`AuthenticationToken`
.. object: type=class name=Microsoft.AspNetCore.Authentication.AuthenticationToken
class :dn:cls:`AuthenticationTokenExtensions`
.. object: type=class name=Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions
class :dn:cls:`Base64UrlTextEncoder`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Base64UrlTextEncoder
class :dn:cls:`BaseContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.BaseContext
class :dn:cls:`BaseControlContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.BaseControlContext
class :dn:cls:`ClaimsTransformationContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.ClaimsTransformationContext
class :dn:cls:`ClaimsTransformationHandler`
.. object: type=class name=Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler
Handler that applies ClaimsTransformation to authentication
class :dn:cls:`ClaimsTransformationMiddleware`
.. object: type=class name=Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware
class :dn:cls:`ClaimsTransformer`
.. object: type=class name=Microsoft.AspNetCore.Authentication.ClaimsTransformer
class :dn:cls:`FailureContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.FailureContext
Provides failure context information to middleware providers.
class :dn:cls:`PropertiesDataFormat`
.. object: type=class name=Microsoft.AspNetCore.Authentication.PropertiesDataFormat
class :dn:cls:`PropertiesSerializer`
.. object: type=class name=Microsoft.AspNetCore.Authentication.PropertiesSerializer
class :dn:cls:`RemoteAuthenticationEvents`
.. object: type=class name=Microsoft.AspNetCore.Authentication.RemoteAuthenticationEvents
class :dn:cls:`RemoteAuthenticationHandler\<TOptions>`
.. object: type=class name=Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler\<TOptions>
class :dn:cls:`SecureDataFormat\`
.. object: type=class name=Microsoft.AspNetCore.Authentication.SecureDataFormat\
class :dn:cls:`SharedAuthenticationOptions`
.. object: type=class name=Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions
class :dn:cls:`SystemClock`
.. object: type=class name=Microsoft.AspNetCore.Authentication.SystemClock
Provides access to the normal system clock.
class :dn:cls:`TicketDataFormat`
.. object: type=class name=Microsoft.AspNetCore.Authentication.TicketDataFormat
class :dn:cls:`TicketReceivedContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.TicketReceivedContext
Provides context information to middleware providers.
class :dn:cls:`TicketSerializer`
.. object: type=class name=Microsoft.AspNetCore.Authentication.TicketSerializer
.. rubric:: Enumerations
enum :dn:enum:`EventResultState`
.. object: type=enum name=Microsoft.AspNetCore.Authentication.EventResultStateFile: api/autoapi/Microsoft/AspNetCore/Authentication/AuthenticateResult/index.rst
AuthenticateResult Class
Contains the result of an Authenticate call
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.AuthenticateResult
Syntax
.. code-block:: csharp
public class AuthenticateResult.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticateResult
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticateResult
Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticateResult
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticateResult.Fail(System.Exception)
:type failure: System.Exception
:rtype: Microsoft.AspNetCore.Authentication.AuthenticateResult
.. code-block:: csharp
public static AuthenticateResult Fail(Exception failure)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticateResult.Fail(System.String)
:type failureMessage: System.String
:rtype: Microsoft.AspNetCore.Authentication.AuthenticateResult
.. code-block:: csharp
public static AuthenticateResult Fail(string failureMessage)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticateResult.Skip()
:rtype: Microsoft.AspNetCore.Authentication.AuthenticateResult
.. code-block:: csharp
public static AuthenticateResult Skip()
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticateResult.Success(Microsoft.AspNetCore.Authentication.AuthenticationTicket)
:type ticket: Microsoft.AspNetCore.Authentication.AuthenticationTicket
:rtype: Microsoft.AspNetCore.Authentication.AuthenticateResult
.. code-block:: csharp
public static AuthenticateResult Success(AuthenticationTicket ticket)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticateResult
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticateResult.Failure
Holds failure information from the authentication.
:rtype: System.Exception
.. code-block:: csharp
public Exception Failure { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticateResult.Skipped
Indicates that this stage of authentication was skipped by user intervention.
:rtype: System.Boolean
.. code-block:: csharp
public bool Skipped { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticateResult.Succeeded
If a ticket was produced, authenticate was successful.
:rtype: System.Boolean
.. code-block:: csharp
public bool Succeeded { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticateResult.Ticket
The authentication ticket.
:rtype: Microsoft.AspNetCore.Authentication.AuthenticationTicket
.. code-block:: csharp
public AuthenticationTicket Ticket { get; }File: api/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationHandler-TOptions/index.rst
AuthenticationHandler Class
Base class for the per-request work performed by most authentication middleware.
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.AuthenticationHandler\<TOptions>
Syntax
.. code-block:: csharp
public abstract class AuthenticationHandler<TOptions> : IAuthenticationHandler where TOptions : AuthenticationOptions.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationHandler`1
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationHandler
Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationHandler
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.AuthenticateAsync(Microsoft.AspNetCore.Http.Features.Authentication.AuthenticateContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.AuthenticateContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task AuthenticateAsync(AuthenticateContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.BuildRedirectUri(System.String)
:type targetPath: System.String
:rtype: System.String
.. code-block:: csharp
protected string BuildRedirectUri(string targetPath)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.ChallengeAsync(Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task ChallengeAsync(ChallengeContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.FinishResponseAsync()
Hook that is called when the response about to be sent
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
protected virtual Task FinishResponseAsync()
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.GetDescriptions(Microsoft.AspNetCore.Http.Features.Authentication.DescribeSchemesContext)
:type describeContext: Microsoft.AspNetCore.Http.Features.Authentication.DescribeSchemesContext
.. code-block:: csharp
public void GetDescriptions(DescribeSchemesContext describeContext)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.HandleAuthenticateAsync()
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{Microsoft.AspNetCore.Authentication.AuthenticateResult<Microsoft.AspNetCore.Authentication.AuthenticateResult>}
.. code-block:: csharp
protected abstract Task<AuthenticateResult> HandleAuthenticateAsync()
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.HandleAuthenticateOnceAsync()
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{Microsoft.AspNetCore.Authentication.AuthenticateResult<Microsoft.AspNetCore.Authentication.AuthenticateResult>}
.. code-block:: csharp
protected Task<AuthenticateResult> HandleAuthenticateOnceAsync()
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.HandleForbiddenAsync(Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{System.Boolean<System.Boolean>}
.. code-block:: csharp
protected virtual Task HandleForbiddenAsync(ChallengeContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.HandleRequestAsync()
Called once by common code after initialization. If an authentication middleware responds directly to
specifically known paths it must override this virtual, compare the request path to it's known paths,
provide any response information as appropriate, and true to stop further processing.
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{System.Boolean<System.Boolean>}
:return: Returning false will cause the common code to call the next middleware in line. Returning true will
cause the common code to begin the async completion journey without calling the rest of the middleware
pipeline.
.. code-block:: csharp
public virtual Task HandleRequestAsync()
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.HandleSignInAsync(Microsoft.AspNetCore.Http.Features.Authentication.SignInContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.SignInContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
protected virtual Task HandleSignInAsync(SignInContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.HandleSignOutAsync(Microsoft.AspNetCore.Http.Features.Authentication.SignOutContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.SignOutContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
protected virtual Task HandleSignOutAsync(SignOutContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.HandleUnauthorizedAsync(Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext)
Override this method to deal with 401 challenge concerns, if an authentication scheme in question
deals an authentication interaction as part of it's request flow. (like adding a response header, or
changing the 401 result to 302 of a login page or external sign-in location.)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{System.Boolean<System.Boolean>}
:return: True if no other handlers should be called
.. code-block:: csharp
protected virtual Task HandleUnauthorizedAsync(ChallengeContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.InitializeAsync(TOptions, Microsoft.AspNetCore.Http.HttpContext, Microsoft.Extensions.Logging.ILogger, System.Text.Encodings.Web.UrlEncoder)
Initialize is called once per request to contextualize this instance with appropriate state.
:param options: The original options passed by the application control behavior
:type options: TOptions
:param context: The utility object to observe the current request and response
:type context: Microsoft.AspNetCore.Http.HttpContext
:param logger: The logging factory used to create loggers
:type logger: Microsoft.Extensions.Logging.ILogger
:param encoder: The :dn:prop:`Microsoft.AspNetCore.Authentication.AuthenticationHandler\`1.UrlEncoder`\.
:type encoder: System.Text.Encodings.Web.UrlEncoder
:rtype: System.Threading.Tasks.Task
:return: async completion
.. code-block:: csharp
public Task InitializeAsync(TOptions options, HttpContext context, ILogger logger, UrlEncoder encoder)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.ShouldHandleScheme(System.String, System.Boolean)
:type authenticationScheme: System.String
:type handleAutomatic: System.Boolean
:rtype: System.Boolean
.. code-block:: csharp
public bool ShouldHandleScheme(string authenticationScheme, bool handleAutomatic)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.SignInAsync(Microsoft.AspNetCore.Http.Features.Authentication.SignInContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.SignInContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task SignInAsync(SignInContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.SignOutAsync(Microsoft.AspNetCore.Http.Features.Authentication.SignOutContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.SignOutContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task SignOutAsync(SignOutContext context)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationHandler
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.ChallengeCalled
:rtype: System.Boolean
.. code-block:: csharp
protected bool ChallengeCalled { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.Context
:rtype: Microsoft.AspNetCore.Http.HttpContext
.. code-block:: csharp
protected HttpContext Context { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.CurrentUri
:rtype: System.String
.. code-block:: csharp
protected string CurrentUri { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.Logger
:rtype: Microsoft.Extensions.Logging.ILogger
.. code-block:: csharp
protected ILogger Logger { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.Options
:rtype: TOptions
.. code-block:: csharp
protected TOptions Options { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.OriginalPath
:rtype: Microsoft.AspNetCore.Http.PathString
.. code-block:: csharp
protected PathString OriginalPath { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.OriginalPathBase
:rtype: Microsoft.AspNetCore.Http.PathString
.. code-block:: csharp
protected PathString OriginalPathBase { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.PriorHandler
:rtype: Microsoft.AspNetCore.Http.Features.Authentication.IAuthenticationHandler
.. code-block:: csharp
public IAuthenticationHandler PriorHandler { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.Request
:rtype: Microsoft.AspNetCore.Http.HttpRequest
.. code-block:: csharp
protected HttpRequest Request { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.Response
:rtype: Microsoft.AspNetCore.Http.HttpResponse
.. code-block:: csharp
protected HttpResponse Response { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.SignInAccepted
:rtype: System.Boolean
.. code-block:: csharp
protected bool SignInAccepted { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.SignOutAccepted
:rtype: System.Boolean
.. code-block:: csharp
protected bool SignOutAccepted { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>.UrlEncoder
:rtype: System.Text.Encodings.Web.UrlEncoder
.. code-block:: csharp
protected UrlEncoder UrlEncoder { get; }File: api/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationMiddleware-TOptions/index.rst
AuthenticationMiddleware Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware\<TOptions>
Syntax
.. code-block:: csharp
public abstract class AuthenticationMiddleware<TOptions>
where TOptions : AuthenticationOptions, new ().. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware<TOptions>.AuthenticationMiddleware(Microsoft.AspNetCore.Http.RequestDelegate, Microsoft.Extensions.Options.IOptions<TOptions>, Microsoft.Extensions.Logging.ILoggerFactory, System.Text.Encodings.Web.UrlEncoder)
:type next: Microsoft.AspNetCore.Http.RequestDelegate
:type options: Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Options.IOptions`1>{TOptions}
:type loggerFactory: Microsoft.Extensions.Logging.ILoggerFactory
:type encoder: System.Text.Encodings.Web.UrlEncoder
.. code-block:: csharp
protected AuthenticationMiddleware(RequestDelegate next, IOptions<TOptions> options, ILoggerFactory loggerFactory, UrlEncoder encoder)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware<TOptions>.AuthenticationScheme
:rtype: System.String
.. code-block:: csharp
public string AuthenticationScheme { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware<TOptions>.Logger
:rtype: Microsoft.Extensions.Logging.ILogger
.. code-block:: csharp
public ILogger Logger { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware<TOptions>.Options
:rtype: TOptions
.. code-block:: csharp
public TOptions Options { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware<TOptions>.UrlEncoder
:rtype: System.Text.Encodings.Web.UrlEncoder
.. code-block:: csharp
public UrlEncoder UrlEncoder { get; set; }Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware<TOptions>.CreateHandler()
:rtype: Microsoft.AspNetCore.Authentication.AuthenticationHandler<Microsoft.AspNetCore.Authentication.AuthenticationHandler`1>{TOptions}
.. code-block:: csharp
protected abstract AuthenticationHandler<TOptions> CreateHandler()
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationMiddleware<TOptions>.Invoke(Microsoft.AspNetCore.Http.HttpContext)
:type context: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task Invoke(HttpContext context)File: api/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationTicket/index.rst
AuthenticationTicket Class
Contains user identity information as well as additional authentication state.
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.AuthenticationTicket
Syntax
.. code-block:: csharp
public class AuthenticationTicket.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationTicket
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationTicket
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationTicket
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.AuthenticationTicket.AuthenticationTicket(System.Security.Claims.ClaimsPrincipal, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties, System.String)
Initializes a new instance of the :any:`Microsoft.AspNetCore.Authentication.AuthenticationTicket` class
:param principal: the :any:`System.Security.Claims.ClaimsPrincipal` that represents the authenticated user.
:type principal: System.Security.Claims.ClaimsPrincipal
:param properties: additional properties that can be consumed by the user or runtime.
:type properties: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
:param authenticationScheme: the authentication middleware that was responsible for this ticket.
:type authenticationScheme: System.String
.. code-block:: csharp
public AuthenticationTicket(ClaimsPrincipal principal, AuthenticationProperties properties, string authenticationScheme)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationTicket
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationTicket.AuthenticationScheme
Gets the authentication type.
:rtype: System.String
.. code-block:: csharp
public string AuthenticationScheme { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationTicket.Principal
Gets the claims-principal with authenticated user identities.
:rtype: System.Security.Claims.ClaimsPrincipal
.. code-block:: csharp
public ClaimsPrincipal Principal { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationTicket.Properties
Additional state values for the authentication session.
:rtype: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
.. code-block:: csharp
public AuthenticationProperties Properties { get; }File: api/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationToken/index.rst
AuthenticationToken Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.AuthenticationToken
Syntax
.. code-block:: csharp
public class AuthenticationToken.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationToken
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationToken
Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationToken
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationToken.Name
:rtype: System.String
.. code-block:: csharp
public string Name { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.AuthenticationToken.Value
:rtype: System.String
.. code-block:: csharp
public string Value { get; set; }File: api/autoapi/Microsoft/AspNetCore/Authentication/AuthenticationTokenExtensions/index.rst
AuthenticationTokenExtensions Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions
Syntax
.. code-block:: csharp
public class AuthenticationTokenExtensions.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions
Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions.GetTokenAsync(Microsoft.AspNetCore.Http.Authentication.AuthenticationManager, System.String)
:type manager: Microsoft.AspNetCore.Http.Authentication.AuthenticationManager
:type tokenName: System.String
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{System.String<System.String>}
.. code-block:: csharp
public static Task<string> GetTokenAsync(this AuthenticationManager manager, string tokenName)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions.GetTokenAsync(Microsoft.AspNetCore.Http.Authentication.AuthenticationManager, System.String, System.String)
:type manager: Microsoft.AspNetCore.Http.Authentication.AuthenticationManager
:type signInScheme: System.String
:type tokenName: System.String
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{System.String<System.String>}
.. code-block:: csharp
public static Task<string> GetTokenAsync(this AuthenticationManager manager, string signInScheme, string tokenName)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions.GetTokenValue(Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties, System.String)
:type properties: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
:type tokenName: System.String
:rtype: System.String
.. code-block:: csharp
public static string GetTokenValue(this AuthenticationProperties properties, string tokenName)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions.GetTokens(Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties)
:type properties: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
:rtype: System.Collections.Generic.IEnumerable<System.Collections.Generic.IEnumerable`1>{Microsoft.AspNetCore.Authentication.AuthenticationToken<Microsoft.AspNetCore.Authentication.AuthenticationToken>}
.. code-block:: csharp
public static IEnumerable<AuthenticationToken> GetTokens(this AuthenticationProperties properties)
.. dn:method:: Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions.StoreTokens(Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authentication.AuthenticationToken>)
:type properties: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
:type tokens: System.Collections.Generic.IEnumerable<System.Collections.Generic.IEnumerable`1>{Microsoft.AspNetCore.Authentication.AuthenticationToken<Microsoft.AspNetCore.Authentication.AuthenticationToken>}
.. code-block:: csharp
public static void StoreTokens(this AuthenticationProperties properties, IEnumerable<AuthenticationToken> tokens)File: api/autoapi/Microsoft/AspNetCore/Authentication/Base64UrlTextEncoder/index.rst
Base64UrlTextEncoder Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.Base64UrlTextEncoder
Syntax
.. code-block:: csharp
public class Base64UrlTextEncoder.. dn:class:: Microsoft.AspNetCore.Authentication.Base64UrlTextEncoder
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Base64UrlTextEncoder
Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.Base64UrlTextEncoder
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.Base64UrlTextEncoder.Decode(System.String)
:type text: System.String
:rtype: System.Byte<System.Byte>[]
.. code-block:: csharp
public static byte[] Decode(string text)
.. dn:method:: Microsoft.AspNetCore.Authentication.Base64UrlTextEncoder.Encode(System.Byte[])
:type data: System.Byte<System.Byte>[]
:rtype: System.String
.. code-block:: csharp
public static string Encode(byte[] data)File: api/autoapi/Microsoft/AspNetCore/Authentication/BaseContext/index.rst
BaseContext Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.BaseContext
Syntax
.. code-block:: csharp
public abstract class BaseContext.. dn:class:: Microsoft.AspNetCore.Authentication.BaseContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.BaseContext
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.BaseContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.BaseContext.BaseContext(Microsoft.AspNetCore.Http.HttpContext)
:type context: Microsoft.AspNetCore.Http.HttpContext
.. code-block:: csharp
protected BaseContext(HttpContext context)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.BaseContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.BaseContext.HttpContext
:rtype: Microsoft.AspNetCore.Http.HttpContext
.. code-block:: csharp
public HttpContext HttpContext { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.BaseContext.Request
:rtype: Microsoft.AspNetCore.Http.HttpRequest
.. code-block:: csharp
public HttpRequest Request { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.BaseContext.Response
:rtype: Microsoft.AspNetCore.Http.HttpResponse
.. code-block:: csharp
public HttpResponse Response { get; }File: api/autoapi/Microsoft/AspNetCore/Authentication/BaseControlContext/index.rst
BaseControlContext Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.BaseContext - :dn:cls:
Microsoft.AspNetCore.Authentication.BaseControlContext
Syntax
.. code-block:: csharp
public class BaseControlContext : BaseContext.. dn:class:: Microsoft.AspNetCore.Authentication.BaseControlContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.BaseControlContext
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.BaseControlContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.BaseControlContext.BaseControlContext(Microsoft.AspNetCore.Http.HttpContext)
:type context: Microsoft.AspNetCore.Http.HttpContext
.. code-block:: csharp
protected BaseControlContext(HttpContext context)Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.BaseControlContext
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.BaseControlContext.CheckEventResult(out Microsoft.AspNetCore.Authentication.AuthenticateResult)
:type result: Microsoft.AspNetCore.Authentication.AuthenticateResult
:rtype: System.Boolean
.. code-block:: csharp
public bool CheckEventResult(out AuthenticateResult result)
.. dn:method:: Microsoft.AspNetCore.Authentication.BaseControlContext.HandleResponse()
Discontinue all processing for this request and return to the client.
The caller is responsible for generating the full response.
Set the :dn:prop:`Microsoft.AspNetCore.Authentication.BaseControlContext.Ticket` to trigger SignIn.
.. code-block:: csharp
public void HandleResponse()
.. dn:method:: Microsoft.AspNetCore.Authentication.BaseControlContext.SkipToNextMiddleware()
Discontinue processing the request in the current middleware and pass control to the next one.
SignIn will not be called.
.. code-block:: csharp
public void SkipToNextMiddleware()Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.BaseControlContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.BaseControlContext.HandledResponse
:rtype: System.Boolean
.. code-block:: csharp
public bool HandledResponse { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.BaseControlContext.Skipped
:rtype: System.Boolean
.. code-block:: csharp
public bool Skipped { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.BaseControlContext.State
:rtype: Microsoft.AspNetCore.Authentication.EventResultState
.. code-block:: csharp
public EventResultState State { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.BaseControlContext.Ticket
Gets or set the :dn:prop:`Microsoft.AspNetCore.Authentication.BaseControlContext.Ticket` to return if this event signals it handled the event.
:rtype: Microsoft.AspNetCore.Authentication.AuthenticationTicket
.. code-block:: csharp
public AuthenticationTicket Ticket { get; set; }File: api/autoapi/Microsoft/AspNetCore/Authentication/ClaimsTransformationContext/index.rst
ClaimsTransformationContext Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.ClaimsTransformationContext
Syntax
.. code-block:: csharp
public class ClaimsTransformationContext.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationContext
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.ClaimsTransformationContext.ClaimsTransformationContext(Microsoft.AspNetCore.Http.HttpContext)
:type context: Microsoft.AspNetCore.Http.HttpContext
.. code-block:: csharp
public ClaimsTransformationContext(HttpContext context)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.ClaimsTransformationContext.Context
:rtype: Microsoft.AspNetCore.Http.HttpContext
.. code-block:: csharp
public HttpContext Context { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.ClaimsTransformationContext.Principal
:rtype: System.Security.Claims.ClaimsPrincipal
.. code-block:: csharp
public ClaimsPrincipal Principal { get; set; }File: api/autoapi/Microsoft/AspNetCore/Authentication/ClaimsTransformationHandler/index.rst
ClaimsTransformationHandler Class
Handler that applies ClaimsTransformation to authentication
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler
Syntax
.. code-block:: csharp
public class ClaimsTransformationHandler : IAuthenticationHandler.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler.ClaimsTransformationHandler(Microsoft.AspNetCore.Authentication.IClaimsTransformer, Microsoft.AspNetCore.Http.HttpContext)
:type transform: Microsoft.AspNetCore.Authentication.IClaimsTransformer
:type httpContext: Microsoft.AspNetCore.Http.HttpContext
.. code-block:: csharp
public ClaimsTransformationHandler(IClaimsTransformer transform, HttpContext httpContext)Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler.AuthenticateAsync(Microsoft.AspNetCore.Http.Features.Authentication.AuthenticateContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.AuthenticateContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task AuthenticateAsync(AuthenticateContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler.ChallengeAsync(Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task ChallengeAsync(ChallengeContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler.GetDescriptions(Microsoft.AspNetCore.Http.Features.Authentication.DescribeSchemesContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.DescribeSchemesContext
.. code-block:: csharp
public void GetDescriptions(DescribeSchemesContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler.RegisterAuthenticationHandler(Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature)
:type auth: Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature
.. code-block:: csharp
public void RegisterAuthenticationHandler(IHttpAuthenticationFeature auth)
.. dn:method:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler.SignInAsync(Microsoft.AspNetCore.Http.Features.Authentication.SignInContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.SignInContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task SignInAsync(SignInContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler.SignOutAsync(Microsoft.AspNetCore.Http.Features.Authentication.SignOutContext)
:type context: Microsoft.AspNetCore.Http.Features.Authentication.SignOutContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task SignOutAsync(SignOutContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler.UnregisterAuthenticationHandler(Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature)
:type auth: Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature
.. code-block:: csharp
public void UnregisterAuthenticationHandler(IHttpAuthenticationFeature auth)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.ClaimsTransformationHandler.PriorHandler
:rtype: Microsoft.AspNetCore.Http.Features.Authentication.IAuthenticationHandler
.. code-block:: csharp
public IAuthenticationHandler PriorHandler { get; set; }File: api/autoapi/Microsoft/AspNetCore/Authentication/ClaimsTransformationMiddleware/index.rst
ClaimsTransformationMiddleware Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware
Syntax
.. code-block:: csharp
public class ClaimsTransformationMiddleware.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware.ClaimsTransformationMiddleware(Microsoft.AspNetCore.Http.RequestDelegate, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.ClaimsTransformationOptions>)
:type next: Microsoft.AspNetCore.Http.RequestDelegate
:type options: Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Options.IOptions`1>{Microsoft.AspNetCore.Builder.ClaimsTransformationOptions<Microsoft.AspNetCore.Builder.ClaimsTransformationOptions>}
.. code-block:: csharp
public ClaimsTransformationMiddleware(RequestDelegate next, IOptions<ClaimsTransformationOptions> options)Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext)
:type context: Microsoft.AspNetCore.Http.HttpContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public Task Invoke(HttpContext context)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.ClaimsTransformationMiddleware.Options
:rtype: Microsoft.AspNetCore.Builder.ClaimsTransformationOptions
.. code-block:: csharp
public ClaimsTransformationOptions Options { get; set; }File: api/autoapi/Microsoft/AspNetCore/Authentication/ClaimsTransformer/index.rst
ClaimsTransformer Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication
Assemblies
* Microsoft.AspNetCore.Authentication
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.ClaimsTransformer
Syntax
.. code-block:: csharp
public class ClaimsTransformer : IClaimsTransformer.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformer
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformer
Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformer
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.ClaimsTransformer.OnTransform
:rtype: System.Func<System.Func`2>{Microsoft.AspNetCore.Authentication.ClaimsTransformationContext<Microsoft.AspNetCore.Authentication.ClaimsTransformationContext>, System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{System.Security.Claims.ClaimsPrincipal<System.Security.Claims.ClaimsPrincipal>}}
.. code-block:: csharp
public Func<ClaimsTransformationContext, Task<ClaimsPrincipal>> OnTransform { get; set; }Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.ClaimsTransformer
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.ClaimsTransformer.TransformAsync(Microsoft.AspNetCore.Authentication.ClaimsTransformationContext)
:type context: Microsoft.AspNetCore.Authentication.ClaimsTransformationContext
:rtype: System.Threading.Tasks.Task<System.Threading.Tasks.Task`1>{System.Security.Claims.ClaimsPrincipal<System.Security.Claims.ClaimsPrincipal>}
.. code-block:: csharp
public virtual Task<ClaimsPrincipal> TransformAsync(ClaimsTransformationContext context)File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/index.rst
Microsoft.AspNetCore.Authentication.Cookies Namespace
.. toctree::
:hidden:
:maxdepth: 2
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/BaseCookieContext/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/ChunkingCookieManager/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieAuthenticationDefaults/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieAuthenticationEvents/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieAuthenticationMiddleware/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieRedirectContext/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieSignedInContext/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieSigningInContext/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieSigningOutContext/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieValidatePrincipalContext/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/ICookieAuthenticationEvents/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/ICookieManager/index
/autoapi/Microsoft/AspNetCore/Authentication/Cookies/ITicketStore/index
.. toctree::
:hidden:
:maxdepth: 2
.. dn:namespace:: Microsoft.AspNetCore.Authentication.Cookies
.. rubric:: Interfaces
interface :dn:iface:`ICookieAuthenticationEvents`
.. object: type=interface name=Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents
Specifies callback methods which the :any:`Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware` invokes to enable developer control over the authentication process. />
interface :dn:iface:`ICookieManager`
.. object: type=interface name=Microsoft.AspNetCore.Authentication.Cookies.ICookieManager
This is used by the CookieAuthenticationMiddleware to process request and response cookies.
It is abstracted from the normal cookie APIs to allow for complex operations like chunking.
interface :dn:iface:`ITicketStore`
.. object: type=interface name=Microsoft.AspNetCore.Authentication.Cookies.ITicketStore
This provides an abstract storage mechanic to preserve identity information on the server
while only sending a simple identifier key to the client. This is most commonly used to mitigate
issues with serializing large identities into cookies.
.. rubric:: Classes
class :dn:cls:`BaseCookieContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext
class :dn:cls:`ChunkingCookieManager`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager
This handles cookies that are limited by per cookie length. It breaks down long cookies for responses, and reassembles them
from requests.
class :dn:cls:`CookieAuthenticationDefaults`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults
Default values related to cookie-based authentication middleware
class :dn:cls:`CookieAuthenticationEvents`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents
This default implementation of the ICookieAuthenticationEvents may be used if the
application only needs to override a few of the interface methods. This may be used as a base class
or may be instantiated directly.
class :dn:cls:`CookieAuthenticationMiddleware`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware
class :dn:cls:`CookieRedirectContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
Context passed when a Challenge, SignIn, or SignOut causes a redirect in the cookie middleware
class :dn:cls:`CookieSignedInContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext
Context object passed to the ICookieAuthenticationEvents method SignedIn.
class :dn:cls:`CookieSigningInContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext
Context object passed to the ICookieAuthenticationEvents method SigningIn.
class :dn:cls:`CookieSigningOutContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext
Context object passed to the ICookieAuthenticationEvents method SigningOut
class :dn:cls:`CookieValidatePrincipalContext`
.. object: type=class name=Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext
Context object passed to the ICookieAuthenticationProvider method ValidatePrincipal.File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/BaseCookieContext/index.rst
BaseCookieContext Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.BaseContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext
Syntax
.. code-block:: csharp
public class BaseCookieContext : BaseContext.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext.BaseCookieContext(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Builder.CookieAuthenticationOptions)
:type context: Microsoft.AspNetCore.Http.HttpContext
:type options: Microsoft.AspNetCore.Builder.CookieAuthenticationOptions
.. code-block:: csharp
public BaseCookieContext(HttpContext context, CookieAuthenticationOptions options)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext.Options
:rtype: Microsoft.AspNetCore.Builder.CookieAuthenticationOptions
.. code-block:: csharp
public CookieAuthenticationOptions Options { get; }File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/ChunkingCookieManager/index.rst
ChunkingCookieManager Class
This handles cookies that are limited by per cookie length. It breaks down long cookies for responses, and reassembles them
from requests.
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager
Syntax
.. code-block:: csharp
public class ChunkingCookieManager : ICookieManager.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager.ChunkingCookieManager()
.. code-block:: csharp
public ChunkingCookieManager()Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager.AppendResponseCookie(Microsoft.AspNetCore.Http.HttpContext, System.String, System.String, Microsoft.AspNetCore.Http.CookieOptions)
Appends a new response cookie to the Set-Cookie header. If the cookie is larger than the given size limit
then it will be broken down into multiple cookies as follows:
Set-Cookie: CookieName=chunks-3; path=/
Set-Cookie: CookieNameC1=Segment1; path=/
Set-Cookie: CookieNameC2=Segment2; path=/
Set-Cookie: CookieNameC3=Segment3; path=/
:type context: Microsoft.AspNetCore.Http.HttpContext
:type key: System.String
:type value: System.String
:type options: Microsoft.AspNetCore.Http.CookieOptions
.. code-block:: csharp
public void AppendResponseCookie(HttpContext context, string key, string value, CookieOptions options)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager.DeleteCookie(Microsoft.AspNetCore.Http.HttpContext, System.String, Microsoft.AspNetCore.Http.CookieOptions)
Deletes the cookie with the given key by setting an expired state. If a matching chunked cookie exists on
the request, delete each chunk.
:type context: Microsoft.AspNetCore.Http.HttpContext
:type key: System.String
:type options: Microsoft.AspNetCore.Http.CookieOptions
.. code-block:: csharp
public void DeleteCookie(HttpContext context, string key, CookieOptions options)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager.GetRequestCookie(Microsoft.AspNetCore.Http.HttpContext, System.String)
Get the reassembled cookie. Non chunked cookies are returned normally.
Cookies with missing chunks just have their "chunks-XX" header returned.
:type context: Microsoft.AspNetCore.Http.HttpContext
:type key: System.String
:rtype: System.String
:return: The reassembled cookie, if any, or null.
.. code-block:: csharp
public string GetRequestCookie(HttpContext context, string key)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager.ChunkSize
The maximum size of cookie to send back to the client. If a cookie exceeds this size it will be broken down into multiple
cookies. Set this value to null to disable this behavior. The default is 4090 characters, which is supported by all
common browsers.
Note that browsers may also have limits on the total size of all cookies per domain, and on the number of cookies per domain.
:rtype: System.Nullable<System.Nullable`1>{System.Int32<System.Int32>}
.. code-block:: csharp
public int ? ChunkSize { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager.ThrowForPartialCookies
Throw if not all chunks of a cookie are available on a request for re-assembly.
:rtype: System.Boolean
.. code-block:: csharp
public bool ThrowForPartialCookies { get; set; }File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieAuthenticationDefaults/index.rst
CookieAuthenticationDefaults Class
Default values related to cookie-based authentication middleware
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults
Syntax
.. code-block:: csharp
public class CookieAuthenticationDefaults.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults
Fields
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults
:noindex:
:hidden:
.. dn:field:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.AccessDeniedPath
The default value used by CookieAuthenticationMiddleware for the
CookieAuthenticationOptions.AccessDeniedPath
:rtype: Microsoft.AspNetCore.Http.PathString
.. code-block:: csharp
public static readonly PathString AccessDeniedPath
.. dn:field:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.AuthenticationScheme
The default value used for CookieAuthenticationOptions.AuthenticationScheme
:rtype: System.String
.. code-block:: csharp
public const string AuthenticationScheme = "Cookies"
.. dn:field:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.CookiePrefix
The prefix used to provide a default CookieAuthenticationOptions.CookieName
:rtype: System.String
.. code-block:: csharp
public static readonly string CookiePrefix
.. dn:field:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.LoginPath
The default value used by CookieAuthenticationMiddleware for the
CookieAuthenticationOptions.LoginPath
:rtype: Microsoft.AspNetCore.Http.PathString
.. code-block:: csharp
public static readonly PathString LoginPath
.. dn:field:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.LogoutPath
The default value used by CookieAuthenticationMiddleware for the
CookieAuthenticationOptions.LogoutPath
:rtype: Microsoft.AspNetCore.Http.PathString
.. code-block:: csharp
public static readonly PathString LogoutPath
.. dn:field:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.ReturnUrlParameter
The default value of the CookieAuthenticationOptions.ReturnUrlParameter
:rtype: System.String
.. code-block:: csharp
public static readonly string ReturnUrlParameterFile: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieAuthenticationEvents/index.rst
CookieAuthenticationEvents Class
This default implementation of the ICookieAuthenticationEvents may be used if the
application only needs to override a few of the interface methods. This may be used as a base class
or may be instantiated directly.
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents
Syntax
.. code-block:: csharp
public class CookieAuthenticationEvents : ICookieAuthenticationEvents.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents
Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnRedirectToAccessDenied
A delegate assigned to this property will be invoked when the related method is called.
:rtype: System.Func<System.Func`2>{Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext<Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext>, System.Threading.Tasks.Task<System.Threading.Tasks.Task>}
.. code-block:: csharp
public Func<CookieRedirectContext, Task> OnRedirectToAccessDenied { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnRedirectToLogin
A delegate assigned to this property will be invoked when the related method is called.
:rtype: System.Func<System.Func`2>{Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext<Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext>, System.Threading.Tasks.Task<System.Threading.Tasks.Task>}
.. code-block:: csharp
public Func<CookieRedirectContext, Task> OnRedirectToLogin { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnRedirectToLogout
A delegate assigned to this property will be invoked when the related method is called.
:rtype: System.Func<System.Func`2>{Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext<Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext>, System.Threading.Tasks.Task<System.Threading.Tasks.Task>}
.. code-block:: csharp
public Func<CookieRedirectContext, Task> OnRedirectToLogout { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnRedirectToReturnUrl
A delegate assigned to this property will be invoked when the related method is called.
:rtype: System.Func<System.Func`2>{Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext<Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext>, System.Threading.Tasks.Task<System.Threading.Tasks.Task>}
.. code-block:: csharp
public Func<CookieRedirectContext, Task> OnRedirectToReturnUrl { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnSignedIn
A delegate assigned to this property will be invoked when the related method is called.
:rtype: System.Func<System.Func`2>{Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext<Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext>, System.Threading.Tasks.Task<System.Threading.Tasks.Task>}
.. code-block:: csharp
public Func<CookieSignedInContext, Task> OnSignedIn { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnSigningIn
A delegate assigned to this property will be invoked when the related method is called.
:rtype: System.Func<System.Func`2>{Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext<Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext>, System.Threading.Tasks.Task<System.Threading.Tasks.Task>}
.. code-block:: csharp
public Func<CookieSigningInContext, Task> OnSigningIn { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnSigningOut
A delegate assigned to this property will be invoked when the related method is called.
:rtype: System.Func<System.Func`2>{Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext<Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext>, System.Threading.Tasks.Task<System.Threading.Tasks.Task>}
.. code-block:: csharp
public Func<CookieSigningOutContext, Task> OnSigningOut { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.OnValidatePrincipal
A delegate assigned to this property will be invoked when the related method is called.
:rtype: System.Func<System.Func`2>{Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext<Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext>, System.Threading.Tasks.Task<System.Threading.Tasks.Task>}
.. code-block:: csharp
public Func<CookieValidatePrincipalContext, Task> OnValidatePrincipal { get; set; }Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.RedirectToAccessDenied(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)
Implements the interface method by invoking the related delegate method.
:param context: Contains information about the event
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public virtual Task RedirectToAccessDenied(CookieRedirectContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.RedirectToLogin(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)
Implements the interface method by invoking the related delegate method.
:param context: Contains information about the event
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public virtual Task RedirectToLogin(CookieRedirectContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.RedirectToLogout(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)
Implements the interface method by invoking the related delegate method.
:param context: Contains information about the event
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public virtual Task RedirectToLogout(CookieRedirectContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.RedirectToReturnUrl(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)
Implements the interface method by invoking the related delegate method.
:param context: Contains information about the event
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public virtual Task RedirectToReturnUrl(CookieRedirectContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.SignedIn(Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext)
Implements the interface method by invoking the related delegate method.
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public virtual Task SignedIn(CookieSignedInContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.SigningIn(Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext)
Implements the interface method by invoking the related delegate method.
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public virtual Task SigningIn(CookieSigningInContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.SigningOut(Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext)
Implements the interface method by invoking the related delegate method.
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public virtual Task SigningOut(CookieSigningOutContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents.ValidatePrincipal(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext)
Implements the interface method by invoking the related delegate method.
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
public virtual Task ValidatePrincipal(CookieValidatePrincipalContext context)File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieAuthenticationMiddleware/index.rst
CookieAuthenticationMiddleware Class
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware{Microsoft.AspNetCore.Builder.CookieAuthenticationOptions} - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware
Syntax
.. code-block:: csharp
public class CookieAuthenticationMiddleware : AuthenticationMiddleware<CookieAuthenticationOptions>.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware.CookieAuthenticationMiddleware(Microsoft.AspNetCore.Http.RequestDelegate, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider, Microsoft.Extensions.Logging.ILoggerFactory, System.Text.Encodings.Web.UrlEncoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.CookieAuthenticationOptions>)
:type next: Microsoft.AspNetCore.Http.RequestDelegate
:type dataProtectionProvider: Microsoft.AspNetCore.DataProtection.IDataProtectionProvider
:type loggerFactory: Microsoft.Extensions.Logging.ILoggerFactory
:type urlEncoder: System.Text.Encodings.Web.UrlEncoder
:type options: Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Options.IOptions`1>{Microsoft.AspNetCore.Builder.CookieAuthenticationOptions<Microsoft.AspNetCore.Builder.CookieAuthenticationOptions>}
.. code-block:: csharp
public CookieAuthenticationMiddleware(RequestDelegate next, IDataProtectionProvider dataProtectionProvider, ILoggerFactory loggerFactory, UrlEncoder urlEncoder, IOptions<CookieAuthenticationOptions> options)Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware.CreateHandler()
:rtype: Microsoft.AspNetCore.Authentication.AuthenticationHandler<Microsoft.AspNetCore.Authentication.AuthenticationHandler`1>{Microsoft.AspNetCore.Builder.CookieAuthenticationOptions<Microsoft.AspNetCore.Builder.CookieAuthenticationOptions>}
.. code-block:: csharp
protected override AuthenticationHandler<CookieAuthenticationOptions> CreateHandler()File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieRedirectContext/index.rst
CookieRedirectContext Class
Context passed when a Challenge, SignIn, or SignOut causes a redirect in the cookie middleware
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.BaseContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
Syntax
.. code-block:: csharp
public class CookieRedirectContext : BaseCookieContext.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext.CookieRedirectContext(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Builder.CookieAuthenticationOptions, System.String, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties)
Creates a new context object.
:param context: The HTTP request context
:type context: Microsoft.AspNetCore.Http.HttpContext
:param options: The cookie middleware options
:type options: Microsoft.AspNetCore.Builder.CookieAuthenticationOptions
:param redirectUri: The initial redirect URI
:type redirectUri: System.String
:param properties: The :any:`Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties`\.
:type properties: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
.. code-block:: csharp
public CookieRedirectContext(HttpContext context, CookieAuthenticationOptions options, string redirectUri, AuthenticationProperties properties)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext.Properties
:rtype: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
.. code-block:: csharp
public AuthenticationProperties Properties { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext.RedirectUri
Gets or Sets the URI used for the redirect operation.
:rtype: System.String
.. code-block:: csharp
public string RedirectUri { get; set; }File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieSignedInContext/index.rst
CookieSignedInContext Class
Context object passed to the ICookieAuthenticationEvents method SignedIn.
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.BaseContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext
Syntax
.. code-block:: csharp
public class CookieSignedInContext : BaseCookieContext.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext.CookieSignedInContext(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Builder.CookieAuthenticationOptions, System.String, System.Security.Claims.ClaimsPrincipal, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties)
Creates a new instance of the context object.
:param context: The HTTP request context
:type context: Microsoft.AspNetCore.Http.HttpContext
:param options: The middleware options
:type options: Microsoft.AspNetCore.Builder.CookieAuthenticationOptions
:param authenticationScheme: Initializes AuthenticationScheme property
:type authenticationScheme: System.String
:param principal: Initializes Principal property
:type principal: System.Security.Claims.ClaimsPrincipal
:param properties: Initializes Properties property
:type properties: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
.. code-block:: csharp
public CookieSignedInContext(HttpContext context, CookieAuthenticationOptions options, string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext.AuthenticationScheme
The name of the AuthenticationScheme creating a cookie
:rtype: System.String
.. code-block:: csharp
public string AuthenticationScheme { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext.Principal
Contains the claims that were converted into the outgoing cookie.
:rtype: System.Security.Claims.ClaimsPrincipal
.. code-block:: csharp
public ClaimsPrincipal Principal { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext.Properties
Contains the extra data that was contained in the outgoing cookie.
:rtype: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
.. code-block:: csharp
public AuthenticationProperties Properties { get; }File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieSigningInContext/index.rst
CookieSigningInContext Class
Context object passed to the ICookieAuthenticationEvents method SigningIn.
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.BaseContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext
Syntax
.. code-block:: csharp
public class CookieSigningInContext : BaseCookieContext.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext.CookieSigningInContext(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Builder.CookieAuthenticationOptions, System.String, System.Security.Claims.ClaimsPrincipal, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties, Microsoft.AspNetCore.Http.CookieOptions)
Creates a new instance of the context object.
:param context: The HTTP request context
:type context: Microsoft.AspNetCore.Http.HttpContext
:param options: The middleware options
:type options: Microsoft.AspNetCore.Builder.CookieAuthenticationOptions
:param authenticationScheme: Initializes AuthenticationScheme property
:type authenticationScheme: System.String
:param principal: Initializes Principal property
:type principal: System.Security.Claims.ClaimsPrincipal
:param properties: Initializes Extra property
:type properties: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
:param cookieOptions: Initializes options for the authentication cookie.
:type cookieOptions: Microsoft.AspNetCore.Http.CookieOptions
.. code-block:: csharp
public CookieSigningInContext(HttpContext context, CookieAuthenticationOptions options, string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties, CookieOptions cookieOptions)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext.AuthenticationScheme
The name of the AuthenticationScheme creating a cookie
:rtype: System.String
.. code-block:: csharp
public string AuthenticationScheme { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext.CookieOptions
The options for creating the outgoing cookie.
May be replace or altered during the SigningIn call.
:rtype: Microsoft.AspNetCore.Http.CookieOptions
.. code-block:: csharp
public CookieOptions CookieOptions { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext.Principal
Contains the claims about to be converted into the outgoing cookie.
May be replaced or altered during the SigningIn call.
:rtype: System.Security.Claims.ClaimsPrincipal
.. code-block:: csharp
public ClaimsPrincipal Principal { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext.Properties
Contains the extra data about to be contained in the outgoing cookie.
May be replaced or altered during the SigningIn call.
:rtype: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
.. code-block:: csharp
public AuthenticationProperties Properties { get; set; }File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieSigningOutContext/index.rst
CookieSigningOutContext Class
Context object passed to the ICookieAuthenticationEvents method SigningOut
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.BaseContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext
Syntax
.. code-block:: csharp
public class CookieSigningOutContext : BaseCookieContext.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext.CookieSigningOutContext(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Builder.CookieAuthenticationOptions, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties, Microsoft.AspNetCore.Http.CookieOptions)
:type context: Microsoft.AspNetCore.Http.HttpContext
:type options: Microsoft.AspNetCore.Builder.CookieAuthenticationOptions
:type properties: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
:type cookieOptions: Microsoft.AspNetCore.Http.CookieOptions
.. code-block:: csharp
public CookieSigningOutContext(HttpContext context, CookieAuthenticationOptions options, AuthenticationProperties properties, CookieOptions cookieOptions)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext.CookieOptions
The options for creating the outgoing cookie.
May be replace or altered during the SigningOut call.
:rtype: Microsoft.AspNetCore.Http.CookieOptions
.. code-block:: csharp
public CookieOptions CookieOptions { get; set; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext.Properties
:rtype: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
.. code-block:: csharp
public AuthenticationProperties Properties { get; set; }File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/CookieValidatePrincipalContext/index.rst
CookieValidatePrincipalContext Class
Context object passed to the ICookieAuthenticationProvider method ValidatePrincipal.
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Inheritance Hierarchy
- :dn:cls:
System.Object - :dn:cls:
Microsoft.AspNetCore.Authentication.BaseContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.BaseCookieContext - :dn:cls:
Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext
Syntax
.. code-block:: csharp
public class CookieValidatePrincipalContext : BaseCookieContext.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext
:hidden:
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext
Constructors
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext
:noindex:
:hidden:
.. dn:constructor:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext.CookieValidatePrincipalContext(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Authentication.AuthenticationTicket, Microsoft.AspNetCore.Builder.CookieAuthenticationOptions)
Creates a new instance of the context object.
:type context: Microsoft.AspNetCore.Http.HttpContext
:param ticket: Contains the initial values for identity and extra data
:type ticket: Microsoft.AspNetCore.Authentication.AuthenticationTicket
:type options: Microsoft.AspNetCore.Builder.CookieAuthenticationOptions
.. code-block:: csharp
public CookieValidatePrincipalContext(HttpContext context, AuthenticationTicket ticket, CookieAuthenticationOptions options)Properties
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext
:noindex:
:hidden:
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext.Principal
Contains the claims principal arriving with the request. May be altered to change the
details of the authenticated user.
:rtype: System.Security.Claims.ClaimsPrincipal
.. code-block:: csharp
public ClaimsPrincipal Principal { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext.Properties
Contains the extra meta-data arriving with the request ticket. May be altered.
:rtype: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
.. code-block:: csharp
public AuthenticationProperties Properties { get; }
.. dn:property:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext.ShouldRenew
If true, the cookie will be renewed
:rtype: System.Boolean
.. code-block:: csharp
public bool ShouldRenew { get; set; }Methods
.. dn:class:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext.RejectPrincipal()
Called to reject the incoming principal. This may be done if the application has determined the
account is no longer active, and the request should be treated as if it was anonymous.
.. code-block:: csharp
public void RejectPrincipal()
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext.ReplacePrincipal(System.Security.Claims.ClaimsPrincipal)
Called to replace the claims principal. The supplied principal will replace the value of the
Principal property, which determines the identity of the authenticated request.
:param principal: The :any:`System.Security.Claims.ClaimsPrincipal` used as the replacement
:type principal: System.Security.Claims.ClaimsPrincipal
.. code-block:: csharp
public void ReplacePrincipal(ClaimsPrincipal principal)File: api/autoapi/Microsoft/AspNetCore/Authentication/Cookies/ICookieAuthenticationEvents/index.rst
ICookieAuthenticationEvents Interface
Specifies callback methods which the :any:Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware invokes to enable developer control over the authentication process. />
Namespace
:dn:ns:Microsoft.AspNetCore.Authentication.Cookies
Assemblies
* Microsoft.AspNetCore.Authentication.Cookies
.. contents::
:local:
Syntax
.. code-block:: csharp
public interface ICookieAuthenticationEvents.. dn:interface:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents
:hidden:
.. dn:interface:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents
Methods
.. dn:interface:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents
:noindex:
:hidden:
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents.RedirectToAccessDenied(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)
Called when an access denied causes a redirect in the cookie middleware.
:param context: Contains information about the event
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
Task RedirectToAccessDenied(CookieRedirectContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents.RedirectToLogin(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)
Called when a SignIn causes a redirect in the cookie middleware.
:param context: Contains information about the event
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
Task RedirectToLogin(CookieRedirectContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents.RedirectToLogout(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)
Called when a SignOut causes a redirect in the cookie middleware.
:param context: Contains information about the event
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
Task RedirectToLogout(CookieRedirectContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents.RedirectToReturnUrl(Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext)
Called when redirecting back to the return url in the cookie middleware.
:param context: Contains information about the event
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieRedirectContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
Task RedirectToReturnUrl(CookieRedirectContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents.SignedIn(Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext)
Called when an endpoint has provided sign in information after it is converted into a cookie.
:param context: Contains information about the login session as well as the user :any:`System.Security.Claims.ClaimsIdentity`\.
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
Task SignedIn(CookieSignedInContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents.SigningIn(Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext)
Called when an endpoint has provided sign in information before it is converted into a cookie. By
implementing this method the claims and extra information that go into the ticket may be altered.
:param context: Contains information about the login session as well as the user :any:`System.Security.Claims.ClaimsIdentity`\.
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
Task SigningIn(CookieSigningInContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents.SigningOut(Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext)
Called during the sign-out flow to augment the cookie cleanup process.
:param context: Contains information about the login session as well as information about the authentication cookie.
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext
:rtype: System.Threading.Tasks.Task
.. code-block:: csharp
Task SigningOut(CookieSigningOutContext context)
.. dn:method:: Microsoft.AspNetCore.Authentication.Cookies.ICookieAuthenticationEvents.ValidatePrincipal(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext)
Called each time a request principal has been validated by the middleware. By implementing this method the
application may alter or reject the principal which has arrived with the request.
:param context: Contains information about the login session as well as the user :any:`System.Security.Claims.ClaimsIdentity`\.
:type context: Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext
:rtype: System.Threading.Tasks.Task
:return: A :any:`System.Threading.Tasks.Task` representing the completed operation.
.. code-block:: csharp
Task ValidatePrincipal(CookieValidatePrincipalContext context)