wso2am-2.6.0 не может генерировать токен при включенном GroupExtractor - PullRequest
0 голосов
/ 27 ноября 2018

Использование WSO2AM-2.6.0 с групповым общим доступом к приложениям

Когда включен общий доступ к группам приложений

<APIStore>
<GroupingExtractor>org.wso2.carbon.apimgt.impl.DefaultGroupIDExtractorImpl</GroupingExtractor>

, невозможно создать токен из хранилища со следующим исключением

TID: [-1234] [] [2018-11-27 12:56:11,039] ERROR {org.wso2.carbon.identity.oauth2.OAuth2Service} -  Error occurred while issuing the access token for Client ID : 4t4aXBQTmW55av0KgGVuIseqGvAa, User ID null, Scope : [default] and Grant Type : client_credentials {org.wso2.carbon.identity.oauth2.OAuth2Service}
java.lang.NullPointerException
    at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.getApplicationByClientId(ApiMgtDAO.java:11516)
    at org.wso2.carbon.apimgt.impl.utils.APIUtil.getApplicationByClientId(APIUtil.java:7426)
    at org.wso2.carbon.apimgt.keymgt.issuers.APIMTokenIssuer.renewAccessTokenPerRequest(APIMTokenIssuer.java:157)
    at org.wso2.carbon.identity.oauth2.token.handlers.grant.AbstractAuthorizationGrantHandler.accessTokenNotRenewedPerRequest(AbstractAuthorizationGrantHandler.java:808)
    at org.wso2.carbon.identity.oauth2.token.handlers.grant.AbstractAuthorizationGrantHandler.issue(AbstractAuthorizationGrantHandler.java:129)

вернул код к

if (multiGroupAppSharingEnabled) {
  if (application.getGroupId().isEmpty()) {
     application.setGroupId(getGroupId(application.getId()));
  }
}

, и непосредственной причиной проблемы является то, что application.getGroupId () имеет значение null.Как и в базе данных.

Я уже открыл проблему https://github.com/wso2/carbon-apimgt/issues/5874

, но я надеюсь, что есть способ обойтись с помощью совместного использования групп приложений

1 Ответ

0 голосов
/ 27 ноября 2018

Это, кажется, исправлено в ветке разработки.

https://github.com/wso2/carbon-apimgt/pull/5841/files

Редактировать: Кажется, что исправление здесь не то, что нам нужно.Добавлено новое исправление.

https://github.com/wso2/carbon-apimgt/pull/5875/files

...