protected override void ApplicationStarted(UmbracoApplicationBase app, ApplicationContext ctx) { // config doc: https://github.com/mattbrailsford/umbraco-authu OAuth.ConfigureEndpoint("/oauth/token", new OAuthOptions { UserService = new UmbracoMembersOAuthUserService(), SymmetricKey = "856FECBA3B06519C8DDDBC80BB080553", AccessTokenLifeTime = 20, // Minutes AllowInsecureHttp = true // During development only }); }
public void Initialize() { //OAuth.ConfigureEndpoint("/oauth/token", new OAuthOptions //{ // UserService = new UmbracoMembersOAuthUserService(), // SymmetricKey = "856FECBA3B06519C8DDDBC80BB080553", // AccessTokenLifeTime = 20, // Minutes // AllowInsecureHttp = true // During development only //}); OAuth.ConfigureEndpoint("realm", "/oauth/token", new OAuthOptions { UserService = new UmbracoMembersOAuthUserService(), SymmetricKey = "856FECBA3B06519C8DDDBC80BB080553", AccessTokenLifeTime = 20, // Minutes ClientStore = new UmbracoDbOAuthClientStore(), RefreshTokenStore = new UmbracoDbOAuthRefreshTokenStore(), RefreshTokenLifeTime = 1440, // Minutes (1 day) AllowedOrigin = "*", AllowInsecureHttp = true // During development only }); }
/// <summary> /// Override application start for implementing the oAuth /// set symmetric key for authentication token should be > 32 chars /// </summary> /// <param name="app"></param> /// <param name="ctx"></param> protected override void ApplicationStarted(UmbracoApplicationBase app, ApplicationContext ctx) { //OAuth implementation for get the authentication token OAuth.ConfigureEndpoint("/oauth/token", new OAuthOptions { UserService = new UmbracoUsersOAuthUserService(), SymmetricKey = "856FECBA3B06519C8DDDBC80BB080553", AccessTokenLifeTime = 20, // Minutes AllowInsecureHttp = true // During development only }); //OAuth.ConfigureEndpoint("realm", "/oauth/token", new OAuthOptions //{ // UserService = new UmbracoMembersOAuthUserService(), // SymmetricKey = "856FECBA3B06519C8DDDBC80BB080553", // AccessTokenLifeTime = 20, // Minutes // ClientStore = new UmbracoDbOAuthClientStore(), // RefreshTokenStore = new UmbracoDbOAuthRefreshTokenStore(), // RefreshTokenLifeTime = 1440, // Minutes (1 day) // AllowedOrigin = "*", // AllowInsecureHttp = true // During development only //}); }