use of org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService in project product-iots by wso2.
the class APIUtil method getJWTClientManagerService.
/**
* @return JWTClient manager of current context
*/
public static JWTClientManagerService getJWTClientManagerService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
JWTClientManagerService jwtClientManagerService = (JWTClientManagerService) ctx.getOSGiService(JWTClientManagerService.class, null);
if (jwtClientManagerService == null) {
String msg = "JWT Client manager service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return jwtClientManagerService;
}
Aggregations