Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "rattlehub"

Method is purely an example. I want to return 201 for create for angular client without creating a controller

I created a service to get the encrypted users details and then passed these credentials in the OAuth. I dint want to modify the source in Abp.ZeroCore.IdentityServer4 so i have a workaround thats acceptable. thanks

From what i can work out the logic to pass the user name and password is handled by Abp.ZeroCore.IdentityServer4. The IdentityServerRegistrar class in the Web.Core project seems to map it to the user. Is there anyway i can modify the RequestResourceOwnerPasswordAsync without brining in all the BoilerPlate projects into my project.

No that is via the api, not using IdentityServer and OAuth. Calling it via the api worksbut im trying to use the OAuth client as its set up in the console app.
This line of the code ....await tokenClient.RequestResourceOwnerPasswordAsync("admin", "123qwe", "default-api"); I have looked at every controller and added breakpoints on every login i can find but what Controller does RequestResourceOwnerPasswordAsync even call. It sounds simple but i cant find it. I point the Host server at <a class="postlink" href="http://localhost:22742/">http://localhost:22742/</a>

private static async Task&lt;string&gt; GetAccessTokenViaOwnerPasswordAsync()
{
    var disco = await DiscoveryClient.GetAsync(ServerUrlBase);

    using (var httpHandler = new HttpClientHandler())
    {
        httpHandler.CookieContainer.Add(new Uri(ServerUrlBase), new Cookie(MultiTenancyConsts.TenantIdResolveKey, "1")); //Set TenantId

        var tokenClient = new TokenClient(disco.TokenEndpoint, "client", "def2edf7-5d42-4edc-a84a-30136c340e13", httpHandler);
        var tokenResponse = await tokenClient.RequestResourceOwnerPasswordAsync("admin", "123qwe", "default-api");

        //.RequestResourceOwnerPasswordAsync("bob", "bob", "read write offline_access").Result

        if (tokenResponse.IsError)
        {
            Console.WriteLine("Error: ");
            Console.WriteLine(tokenResponse.Error);
        }

        Console.WriteLine(tokenResponse.Json);

        return tokenResponse.AccessToken;
    }
}

I have worked out the issue. The username is encrypted in the db and so i have to look for the encrypted record. The problem is i cant see which controller gets the authentication. Could you please advise me how to attach to the authenticate request.

To clarify. Do i need to authenticate against the MVC or Host Project as well. Ive only enabled Identity Server on the Host project as i only need it to connect to the API. Also is there a point i can set a breat point to debug. I put a break on every debug point i could find but i get the error almost instantly.

The problem is the 2 files with the name nul.

If you cant delete a null file run the following command . rename \.\C:\Projects\Company.Product.Web.MVC\node_modules\datamaps\src\js\deletefile\nul.json deletefile.txt

Then just delete the deletefile.txt

Is it possible to document how to use this in aspnetzero already. Must of us want a pure .net core solution and would accept a alpha version rather than run .net 4.6 as well.

outputFileName: 'wwwroot/view-resources/Areas/AppAreaName/Views/_Bundles/app-layout-libs.js', inputFiles: [ //"wwwroot/lib/jquery-ui/jquery-ui.js",

Out of interest sake, i see you merge jquery.ui but i dont see any other files added or merged to the product. It looks like it isnt needed. Is my assumption correct.

Thank you. Was hard to see where the Boostrap ended.

Showing 1 to 10 of 11 entries