Reputation: 25270
I am using the OWIN OAuth 2.0 Authorization Server sample as a temple for creating my own OAuth service provider using our companies Active Directory.
The "Download the sample code" does not work and I cannot find the Paths
object in the following code snippet
// Enable the Application Sign In Cookie.
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = "Application",
AuthenticationMode = AuthenticationMode.Passive,
LoginPath = new PathString(Paths.LoginPath),
LogoutPath = new PathString(Paths.LogoutPath),
});
What namespace does the Paths
belong to?
Upvotes: 1
Views: 832
Reputation: 4309
This is the definition for that class... From https://code.msdn.microsoft.com/OWIN-OAuth-20-Authorization-ba2b8783/view/SourceCode#content
public static class Paths
{
/// <summary>
/// AuthorizationServer project should run on this URL
/// </summary>
public const string AuthorizationServerBaseAddress = "http://localhost:11625";
/// <summary>
/// ResourceServer project should run on this URL
/// </summary>
public const string ResourceServerBaseAddress = "http://localhost:38385";
/// <summary>
/// ImplicitGrant project should be running on this specific port '38515'
/// </summary>
public const string ImplicitGrantCallBackPath = "http://localhost:38515/Home/SignIn";
/// <summary>
/// AuthorizationCodeGrant project should be running on this URL.
/// </summary>
public const string AuthorizeCodeCallBackPath = "http://localhost:38500/";
public const string AuthorizePath = "/OAuth/Authorize";
public const string TokenPath = "/OAuth/Token";
public const string LoginPath = "/Account/Login";
public const string LogoutPath = "/Account/Logout";
public const string MePath = "/api/Me";
}
Upvotes: 0
Reputation: 25270
I was able to find the working code sample here and the Paths
object is a custom object in the AuthorizationServer MVC project
public class Paths
{
public static string AuthorizePath { get; set; }
public static string LoginPath { get; set; }
public static string LogoutPath { get; set; }
public static string TokenPath { get; set; }
}
Upvotes: 1