Git Product home page Git Product logo

Comments (10)

daisuke-yoshimoto avatar daisuke-yoshimoto commented on May 25, 2024 2

@salaboy @mteodori

It seems to work even in the case of basic authentication by adding a branch when oauth2Auth does not exist as follows.

https://github.com/Activiti/activiti-modeling-app/blob/master/projects/ama-sdk/src/lib/api-implementations/acm-api/request-api.helper.ts#L56

Before

private get api() {
        return this.alfrescoApiService.getInstance().oauth2Auth;
}

After

private get api() {
    var alfrescoApiService = this.alfrescoApiService.getInstance();
    if (alfrescoApiService.oauth2Auth) {
        return alfrescoApiService.oauth2Auth;            
    } else {
        return alfrescoApiService.ecmClient;
    }
}

from activiti-modeling-app.

salaboy avatar salaboy commented on May 25, 2024

@daisuke-yoshimoto so just to clarify... with:

private get api() {
    var alfrescoApiService = this.alfrescoApiService.getInstance();
    if (alfrescoApiService.oauth2Auth) {
        return alfrescoApiService.oauth2Auth;            
    } else {
        return alfrescoApiService.ecmClient;
    }
}

Does it work?

@popovicsandras can we add this code to support basicAuth? It looks lik ecmClient is providing that functionality??

from activiti-modeling-app.

daisuke-yoshimoto avatar daisuke-yoshimoto commented on May 25, 2024

@salaboy
Yeah. It works.

EcmClient and BpmClient has the same method callCustomApi as OauthApi.
But, only EcmClient wokrs.
BpmClient seems to cause another script error.
Alfresco/alfresco-ng2-components#1342
Alfresco/alfresco-ng2-components#1343

export interface EcmClient {
    new(config: AlfrescoApiConfig): EcmClient;

    changeHost(host: string): void;

    setAuthentications(authentications: any): void;

    callApi(path: string, httpMethod: string, pathParams?: any, queryParams?: any, headerParams?: any, formParams?: any, bodyParam?: any, authNames?: string[], contentTypes?: string[], accepts?: string[], returnType?: any, contextRoot?: string, responseType?: string): Promise<any>;

    callCustomApi(path: string, httpMethod: string, pathParams?: any, queryParams?: any, headerParams?: any, formParams?: any, bodyParam?: any, authNames?: string[], contentTypes?: string[], accepts?: string[], returnType?: any, contextRoot?: string, responseType?: string): Promise<any>;
}

export interface BpmClient {
    new(config: AlfrescoApiConfig): BpmClient;

    changeHost(host: string): void;

    setAuthentications(authentications: any): void;

    callApi(path: string, httpMethod: string, pathParams?: any, queryParams?: any, headerParams?: any, formParams?: any, bodyParam?: any, authNames?: string[], contentTypes?: string[], accepts?: string[], returnType?: any, contextRoot?: string, responseType?: string): Promise<any>;

    callCustomApi(path: string, httpMethod: string, pathParams?: any, queryParams?: any, headerParams?: any, formParams?: any, bodyParam?: any, authNames?: string[], contentTypes?: string[], accepts?: string[], returnType?: any, contextRoot?: string, responseType?: string): Promise<any>;
}

from activiti-modeling-app.

popovicsandras avatar popovicsandras commented on May 25, 2024

Sorry, can someone give me a little bit of more context?
We can add the code above for sure, but I don't see how the content service (for which ecmClient exists) fits into the picture of a process modeling application.
What do we want to use the BASIC authentication for.
Until now, my understanding was that, this application is supposed to work with an ACM-like service.
What is changed about the requirements?

from activiti-modeling-app.

salaboy avatar salaboy commented on May 25, 2024

@popovicsandras the context is that we want to run the same application with the same code to use Basic Auth when we run it locally as a desktop application. The first step that we want to achieve is to be able to run a single Docker Image that contains the BE and FE together and uses "local" Basic Auth to login.

from activiti-modeling-app.

salaboy avatar salaboy commented on May 25, 2024

@popovicsandras the reason behind using Basic Auth is that it will allow us to run locally without keycloak while maintaining Roles and Users for some of the backend operations. So using the same FE application code is a must for both scenarios Local and Remote.

from activiti-modeling-app.

popovicsandras avatar popovicsandras commented on May 25, 2024

Ok, let's discuss it on Monday, this one seems like a new request for me, which I'd like to know more about.

I don't think just simply enabling one of ecmClient or bpmClient could solve this problem, as of @daisuke-yoshimoto already raised some issues about it. This is because of that, we are talking about a more complex scenario, where depending on the preferred strategy the following components may need to behave differently:

  • authentication
  • authorisation
  • request sending
  • router guards
  • user menu

from activiti-modeling-app.

epiard13 avatar epiard13 commented on May 25, 2024

Hi there,
I'm trying to use this app, i got it running and everything, but for the life of me i'm not able to login.

  • Is there a default login?
  • Is this Angular app suppose to work by itself, or does it need a backend-end app? if so which one?
  • I've search the whole internet on how to make the login work, i've not been successful, i've even tried the docker examples, but would either run into issues with keycloak or other stuff.

Basically this is what i'm trying to accomplish :

  • Create a diagram, export it and import the xml process into a Runtime app (which i've already setup)

  • I've also signed up online to try to use the modeler from https://activiti.alfresco.com/activiti-app/#/login but i never received the trial email to activate my account.

Please advise

Thank you kindly. @salaboy @daisuke-yoshimoto @popovicsandras

from activiti-modeling-app.

salaboy avatar salaboy commented on May 25, 2024

@epiard13 can you please let us know how are you running the application? and which version are you using?

from activiti-modeling-app.

fcorti avatar fcorti commented on May 25, 2024

Closing this issue, because pretty old.
Feel free to reopen it (or open a new one) if needed.

Cheers.

from activiti-modeling-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.