C# Class TestSite.UmbracoAuthTokenServerExtensions

Extension methods to configure Umbraco for issuing and processing tokens for authentication
显示文件 Open project: mzajkowski/umbraco-rest-api-playground

Public Methods

Method Description
UseUmbracoBackOfficeTokenAuth ( this app, Umbraco.IdentityExtensions.BackOfficeAuthServerProviderOptions backofficeAuthServerProviderOptions = null ) : void

Configures Umbraco to issue and process authentication tokens

This is a very simple implementation of token authentication, the expiry below is for a single day and with this implementation there is no way to force expire tokens on the server however given the code below and the additional callbacks that can be registered for the BackOfficeAuthServerProvider these types of things could be implemented. Additionally the BackOfficeAuthServerProvider could be overridden to include this functionality instead of coding the logic into the callbacks.

Method Details

UseUmbracoBackOfficeTokenAuth() public static method

Configures Umbraco to issue and process authentication tokens
This is a very simple implementation of token authentication, the expiry below is for a single day and with this implementation there is no way to force expire tokens on the server however given the code below and the additional callbacks that can be registered for the BackOfficeAuthServerProvider these types of things could be implemented. Additionally the BackOfficeAuthServerProvider could be overridden to include this functionality instead of coding the logic into the callbacks.
public static UseUmbracoBackOfficeTokenAuth ( this app, Umbraco.IdentityExtensions.BackOfficeAuthServerProviderOptions backofficeAuthServerProviderOptions = null ) : void
app this
backofficeAuthServerProviderOptions Umbraco.IdentityExtensions.BackOfficeAuthServerProviderOptions
return void