micol92 commented on issue #915: URL: https://github.com/apache/incubator-answer/issues/915#issuecomment-2068050940
Hello. Thank you for your reply. SAP BTP(Cloud Platform) provides IAS(Identity Authentication Service), and I used it for OAuth2 service. For the OAuth2 configuration, see the attached file.  And OAuth2 response JSON is as followings. Please note what value I should use for User ID JSON Path. { "firstname": "Jungwoo", "lastname": "Han", "email": "[email protected]", "name": "[email protected]", "scopes": [ "openid", "uaa.user" ], "displayName": "Jungwoo Han ([email protected])" } For debugging the second source, I tried the following. Before the source code where the error occurs, I added some source code to get some information. And then, I tried to build using the guide link for source debugging and failed, so please make sure my Dockerfile is correct. =====modified source codes in my github========================= log.Errorf("[jw log] data : %s", data) userInfo = plugin.ExternalLoginUserInfo{ MetaInfo: string(data), } log.Errorf("[jw log] userInfo : %s", uerInfo) if len(g.Config.UserIDJsonPath) > 0 { userInfo.ExternalID = gjson.GetBytes(data, g.Config.UserIDJsonPath).String() } ======================================================= =============Dockerfile for building Plugin functions============= ======================================================= FROM apache/answer as answer-builder ENV COREPACK_ENABLE_STRICT 0 FROM golang:1.19-alpine AS golang-builder COPY --from=answer-builder /usr/bin/answer /usr/bin/answer RUN apk --no-cache add \ build-base git bash nodejs npm go && \ npm install -g pnpm RUN answer build --with github.com/micol92/jw-incubator-answer-plugins/connector-basic --with github.com/apache/incubator-answer-plugins/storage-s3 --output /usr/bin/new_answer FROM alpine LABEL maintainer="[email protected]" ARG TIMEZONE ENV TIMEZONE=${TIMEZONE:-"Asia/Shanghai"} RUN apk update \ && apk --no-cache add \ bash \ ca-certificates \ curl \ dumb-init \ gettext \ openssh \ sqlite \ gnupg \ tzdata \ && ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \ && echo "${TIMEZONE}" > /etc/timezone COPY --from=golang-builder /usr/bin/new_answer /usr/bin/answer COPY --from=answer-builder /data /data COPY --from=answer-builder /entrypoint.sh /entrypoint.sh RUN chmod 755 /entrypoint.sh VOLUME /data EXPOSE 80 ENTRYPOINT ["/entrypoint.sh"] ======================================================= ====================error log occured during building=================== ======================================================= go: finding module for package github.com/apache/incubator-answer-plugins/storage-s3 go: downloading github.com/micol92/jw-incubator-answer-plugins v1.2.1 go: downloading github.com/apache/incubator-answer-plugins v1.2.1 go: downloading github.com/micol92/jw-incubator-answer-plugins/connector-basic v1.2.6 go: downloading github.com/apache/incubator-answer v1.3.0 go: downloading github.com/apache/incubator-answer-plugins/storage-s3 v1.2.6 go: found github.com/apache/incubator-answer-plugins/storage-s3 in github.com/apache/incubator-answer-plugins/storage-s3 v1.2.6 go: found github.com/apache/incubator-answer/cmd in github.com/apache/incubator-answer v1.3.0 go: found github.com/micol92/jw-incubator-answer-plugins/connector-basic in github.com/micol92/jw-incubator-answer-plugins/connector-basic v1.2.6 go: answer imports github.com/micol92/jw-incubator-answer-plugins/connector-basic: github.com/micol92/jw-incubator-answer-plugins/[email protected]: parsing go.mod: module declares its path as: github.com/apache/incubator-answer-plugins/connector-basic but was required as: github.com/micol92/jw-incubator-answer-plugins/connector-basic build failed exit status 1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
