Activités de "BernardoTeixeira"

Répondre

Hi,

Because of the login, we are trying a different approach. But I have some problems. I created a module abp But i don't to use the IdentityServer Module. I want to use the abp App IdentityServer

I already change the module appsettings and the App appsettings, but every request I make, the module give me an error. Saying "Cannot open database "ModuleTest_Main" requested by the login. The login failed."

How can I fix this? (without using a Gateway)

Répondre

About the identity server/oauth2

Logs -> [17:27:05 INF] Request starting HTTP/1.1 POST https://localhost:44342/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DPower_BI3%26response_type%3Dcode%26scope%3DApplication%26state%3D40807f79-bbdc-4b9b-b908-12e9087cd410%26redirect_uri%3Dhttps%253A%252F%252Foauth.powerbi.com%252Fviews%252Foauthredirect.html application/x-www-form-urlencoded 554
[17:27:05 INF] Executing endpoint '/Account/Login'
[17:27:05 INF] Route matched with {page = "/Account/Login", area = "", action = "", controller = ""}. Executing page /Account/Login
[17:27:05 INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
[17:27:09 INF] Executing handler method Volo.Abp.Account.Public.Web.Pages.Account.LoginModel.OnPostAsync - ModelState is Valid
[17:27:11 WRN] Ldap login feature is not enabled!
[17:27:12 DBG] Augmenting SignInContext
[17:27:12 DBG] Adding idp claim with value: local
[17:27:12 DBG] Adding auth_time claim with value: 1612200432
[17:27:12 INF] AuthenticationScheme: Identity.Application signed in.
[17:27:12 DBG] Added 0 entity changes to the current audit log
[17:27:12 DBG] Added 0 entity changes to the current audit log
[17:27:12 INF] {"Username": "admin", "Provider": null, "ProviderUserId": null, "SubjectId": "85c51e39-c50f-cf82-1dc4-39fa3d73bbf1", "DisplayName": "admin", "Endpoint": "UI", "ClientId": null, "Category": "Authentication", "Name": "User Login Success", "EventType": "Success", "Id": 1000, "Message": null, "ActivityId": "80000407-0006-fe00-b63f-84710c7967bb", "TimeStamp": "2021-02-01T17:27:12.0000000Z", "ProcessId": 31944, "LocalIpAddress": "::1:44342", "RemoteIpAddress": "::1", "$type": "UserLoginSuccessEvent"}
[17:27:12 INF] Executed handler method OnPostAsync, returned result Microsoft.AspNetCore.Mvc.RedirectResult.
[17:27:12 DBG] Added 0 entity changes to the current audit log
[17:27:12 INF] Executing RedirectResult, redirecting to /connect/authorize/callback?client_id=Power_BI3&response_type=code&scope=Application&state=40807f79-bbdc-4b9b-b908-12e9087cd410&redirect_uri=https%3A%2F%2Foauth.powerbi.com%2Fviews%2Foauthredirect.html.
[17:27:12 INF] Executed page /Account/Login in 7615.2262ms
[17:27:12 INF] Executed endpoint '/Account/Login'
[17:27:13 DBG] Added 0 entity changes to the current audit log
[17:27:13 DBG] Added 0 entity changes to the current audit log
[17:27:13 INF] Request finished in 7909.3346ms 302 
[17:27:13 INF] Request starting HTTP/1.1 GET https://localhost:44342/connect/authorize/callback?client_id=Power_BI3&response_type=code&scope=Application&state=40807f79-bbdc-4b9b-b908-12e9087cd410&redirect_uri=https%3A%2F%2Foauth.powerbi.com%2Fviews%2Foauthredirect.html  
[17:27:15 DBG] Request path /connect/authorize/callback matched to endpoint type Authorize
[17:27:15 DBG] Endpoint enabled: Authorize, successfully created handler: IdentityServer4.Endpoints.AuthorizeCallbackEndpoint
[17:27:15 INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.AuthorizeCallbackEndpoint for /connect/authorize/callback
[17:27:15 DBG] Start authorize callback request
[17:27:15 DBG] User in authorize request: 85c51e39-c50f-cf82-1dc4-39fa3d73bbf1
[17:27:15 DBG] Start authorize request protocol validation
[17:27:15 DBG] client configuration validation for client Power_BI3 succeeded.
[17:27:15 DBG] Checking for PKCE parameters
[17:27:15 DBG] No PKCE used.
[17:27:15 DBG] Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator
[17:27:15 DBG] ValidatedAuthorizeRequest
{"ClientId": "Power_BI3", "ClientName": "Power_BI3", "RedirectUri": "https://oauth.powerbi.com/views/oauthredirect.html", "AllowedRedirectUris": ["https://oauth.powerbi.com/views/oauthredirect.html"], "SubjectId": "85c51e39-c50f-cf82-1dc4-39fa3d73bbf1", "ResponseType": "code", "ResponseMode": "query", "GrantType": "authorization_code", "RequestedScopes": "Application", "State": "40807f79-bbdc-4b9b-b908-12e9087cd410", "UiLocales": null, "Nonce": null, "AuthenticationContextReferenceClasses": null, "DisplayMode": null, "PromptMode": null, "MaxAge": null, "LoginHint": null, "SessionId": "rTCbKfv_AjNcLbCnDBS8SA", "Raw": {"client_id": "Power_BI3", "response_type": "code", "scope": "Application", "state": "40807f79-bbdc-4b9b-b908-12e9087cd410", "redirect_uri": "https://oauth.powerbi.com/views/oauthredirect.html"}, "$type": "AuthorizeRequestValidationLog"}
[17:27:15 DBG] Client is configured to not require consent, no consent is required
[17:27:15 DBG] Creating Authorization Code Flow response.
[17:27:16 INF] {"ClientId": "Power_BI3", "ClientName": "Power_BI3", "RedirectUri": "https://oauth.powerbi.com/views/oauthredirect.html", "Endpoint": "Authorize", "SubjectId": "85c51e39-c50f-cf82-1dc4-39fa3d73bbf1", "Scopes": "Application", "GrantType": "authorization_code", "Tokens": [{"TokenType": "code", "TokenValue": "****SmUE", "$type": "Token"}], "Category": "Token", "Name": "Token Issued Success", "EventType": "Success", "Id": 2000, "Message": null, "ActivityId": "80000408-0006-fe00-b63f-84710c7967bb", "TimeStamp": "2021-02-01T17:27:16.0000000Z", "ProcessId": 31944, "LocalIpAddress": "::1:44342", "RemoteIpAddress": "::1", "$type": "TokenIssuedSuccessEvent"}
[17:27:16 DBG] Authorize endpoint response
{"SubjectId": "85c51e39-c50f-cf82-1dc4-39fa3d73bbf1", "ClientId": "Power_BI3", "RedirectUri": "https://oauth.powerbi.com/views/oauthredirect.html", "State": "40807f79-bbdc-4b9b-b908-12e9087cd410", "Scope": "Application", "Error": null, "ErrorDescription": null, "$type": "AuthorizeResponseLog"}
[17:27:16 DBG] Augmenting SignInContext
[17:27:16 INF] AuthenticationScheme: Identity.Application signed in.
[17:27:16 INF] Request finished in 3082.3528ms 302 
[17:27:16 INF] Request starting HTTP/1.1 POST https://localhost:44342/connect/token application/x-www-form-urlencoded 147
The request ->

client_id = "Power_BI3";
client_secret = "1q2w3E*";
redirect_uri = "https://oauth.powerbi.com/views/oauthredirect.html";
windowWidth = 1200;
windowHeight = 1000;


[DataSource.Kind="NextBITT.Analytics", Publish="NextBITT.Analytics.Publish"]
shared NextBITT.Analytics.Contents = (url as text) =>
    let
        source = Json.Document(Web.Contents(url))
    in
        source; 

StartLogin = (resourceUrl, state, display) =>
    let
        AuthorizeUrl = "https://localhost:44342/connect/authorize?" & Uri.BuildQueryString([
            client_id = client_id,
            response_type = "code",
            scope = "Application",
            state = state,
            redirect_uri = redirect_uri])
    in
        [
            LoginUri = AuthorizeUrl,
            CallbackUri = redirect_uri,
            WindowHeight = windowHeight,
            WindowWidth = windowWidth,
            Context = null
        ];

FinishLogin = (context, callbackUri, state) =>
    let
        Parts = Uri.Parts(callbackUri)[Query]
    in
        TokenMethod(Parts[code]);

TokenMethod = (code) =>
    let
        Response = Web.Contents("https://localhost:44342/connect/token", [
            Content = Text.ToBinary(Uri.BuildQueryString([
                client_id = client_id,
                client_secret = client_secret,
                grant_type = "authorization_code",
                redirect_uri = redirect_uri])),
            Headers=[#"Content-type" = "application/x-www-form-urlencoded",#"Accept" = "application/json"]]),
        Parts = Json.Document(Response)
    in
        Parts;

Am I missig some type of configuration or parameter? (The Power Bi Connector and Power Bi desktop continue to crash)

Répondre

Hi, when I added that code -> Configure<MvcOptions>(options =>

swagger can't identify the endpoints for odata.

Répondre

I just follow this Demo(https://github.com/realLiangshiwei/AbpOdataDemo), but I dont have the same result

Répondre

Hi, sure.

the Github link -> deleted

Répondre

One more thing, every response from odataControllers I dont get the normal response.

The response I get now

The Controller

The Edm Model

The OnApplicationInitialization in Host dll

The normal response

how can I get the odata.context?

Répondre

what you mean "plain Identity Server"?

Répondre

the crash ->

Identity logs ->

I sent an old print, this is what I'm using for the Authorization ->

The code I have is similar to this one -> https://github.com/microsoft/DataConnectors/tree/master/samples/Github

Question
  • ABP Framework version: v3.3.1
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): yes

I'm trying to do a power bi application with Oauth2. But every time my application receive the token, it crash.

I register the client Powerbi in the [IdentityServerClients] table with the redirect_uri = "https://oauth.powerbi.com/views/oauthredirect.html". Identity logs

I have the same problem

One more question, if abp has the endpoint for login with cookies why another endpoint to get more cookies?

Affichage de 21 à 30 sur 32 entrées
Made with ❤️ on ABP v8.2.0-preview Updated on mars 25, 2024, 15:11