Git Product home page Git Product logo

atlassian-connect-core's People

Contributors

alexeykostenko avatar breart avatar dependabot[bot] avatar jvanraaij avatar mansilladev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

atlassian-connect-core's Issues

Unauthorized exception on GET request (due to space in query parameter value)

Hi Brezzhnev.
I am trying to to create request to jira api to have users in group provided by name.

$res = $client->get('/rest/api/2/group?groupname=administrators&expand=users');

And this is working normaly.
But when I am trying to get users that are in group that has space in name like one I created.
"od vojeno" it is giving me the 401 resposne.
I have tried all those ways.

$res = $client->get('/rest/api/2/group?groupname=od vojeno&expand=users');

$res = $client->get('/rest/api/2/group?groupname=od+vojeno&expand=users');

$res = $client->get('/rest/api/2/group?groupname=od%20vojeno&expand=users');

$res= $client->get('/rest/api/2/group?groupname=od%20vojeno&expand=users');

$client->get('/rest/api/2/group',[
'query' => [
'groupname' => 'od vojeno',
],
]);
And all combinations with decoded/encoded parameter but cant make it run allways is 401 error

Webhook example shows params in reverse

Param is handled as Tenant / Request whereas the example in the readme shows Request / Tenant

/**
* Handle the incoming webhook
*
* @param \Illuminate\Http\Request $request
* @param \AtlassianConnectCore\Models\Tenant $tenant
*
* @return void
*/
public function handle(Request $request, Tenant $tenant)
{
// ...
}

Using JWT token auth but also keep the driver session

Hello,

First time integrating atlassian connect core testing the jira server service desk. If I already have setup a Laravel auth where users use the driver session guard. How would I implement this package but still keep:

    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],

Is there anywhere in the configuration i could change the web array to like:

    'web_atlassian' => [
        'driver' => 'jwt',
        'provider' => 'users',
    ],

Hope i made myself clear.

Best regards

How to catch / emit an event?

Hello,

Wondering how an event should / can be emitted from the Controller. $client->getEmitter()? Thanks!

Regards,
Jessie

How to define and handle webhooks

Hello,

I need to listen when the user creates and modify a page in Confluence. Too I
would like to know if with your package a can do request to the API of
Confluence.

In your page of the package only I can see one example but I don't understand.

Can you help me send me some examples about there?

Thanks

Does not support Laravel 6

Hello!

I tried to install this package on laravel 6 today and got rejected.

Could you please fix?

Thanks in advance,

Alena
image

Unable to impersonate user

First up, thank you for sharing your work! I am trying to impersonate a user for a put request but can't seem to locate functions that might do that in the package (yet).

Reference: "Atlassian Connect for Express.js provides the .asUserByAccountId method to make requests on users' behalf." from https://developer.atlassian.com/cloud/jira/platform/user-impersonation-for-connect-apps. Example from ACE:
var httpClient = addon.httpClient(req);
httpClient.asUserByAccountId('accountid-of-user-to-act-as').get('/rest/api/latest/myself', function(err, res, body) {
...
});

Looking forward to hear from you soon. Thank you!

Regards,
Jessie

Broke when clientKey suddenly came with "jira:" prefix

Hi, everything seem to be working well until today when these messages were logged:

[2020-11-05 01:45:08] production.ERROR: SQLSTATE[HY000]: General error: 1835 Malformed communication packet (SQL: select * from tenant where client_key = jira:client-key-here and tenant.deleted_at is null limit 1) {"exception":"[object] (Illuminate\Database\QueryException(code: HY000): SQLSTATE[HY000]: General error: 1835 Malformed communication packet (SQL: select * from tenant where client_key = jira:client-key-here and tenant.deleted_at is null limit 1) at /.../vendor/laravel/framework/src/Illuminate/Database/Connection.php:669)
[stacktrace]
#0 /.../vendor/laravel/framework/src/Illuminate/Database/Connection.php(629): Illuminate\Database\Connection->runQueryCallback('select * from ...', Array, Object(Closure)) #1 /.../vendor/laravel/framework/src/Illuminate/Database/Connection.php(338): Illuminate\\Database\\Connection->run('select * from ...', Array, Object(Closure))
#2 /.../vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2149): Illuminate\Database\Connection->select('select * from `...', Array, true)
#3 /.../vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2137): Illuminate\Database\Query\Builder->runSelect()
#4 /.../vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2609): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#5 /.../vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2138): Illuminate\Database\Query\Builder->onceWithColumns(Array, Object(Closure))
#6 /.../vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(545): Illuminate\Database\Query\Builder->get(Array)
#7 /.../vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(529): Illuminate\Database\Eloquent\Builder->getModels(Array)
#8 /.../vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(143): Illuminate\Database\Eloquent\Builder->get(Array)
#9 /.../vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php(131): Illuminate\Database\Eloquent\Builder->first()
#10 /.../vendor/brezzhnev/atlassian-connect-core/src/JWTGuard.php(92): Illuminate\Auth\EloquentUserProvider->retrieveByCredentials(Array)
#11 /.../vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(307): AtlassianConnectCore\JWTGuard->user()
#12 /.../vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Auth\AuthManager->__call('user', Array)
#13 /.../app/Http/Controllers/DashboardController.php(16): Illuminate\Support\Facades\Facade::__callStatic('user', Array)
#14 [internal function]: App\Http\Controllers\DashboardController->__construct()

Looks like the call needs to be handled as a string i.e. clientKey value to be wrapped around quotes before sending to the database.

1.2.3 version get methods geting errors

For the usage with jira there are a lot of GEt methods that are not using query parameters.
So the calls are being normally without path?anything
And if we use those calls normally to get results the new JWTHelper have a error in the qsh function
PART:
// Parse a query into the map of parameters
parse_str($parts['query'], $params);

It is trying to get query parts but there isnt any query parts.

Change:
$params=array();
if(isset($parts['query']))
parse_str($parts['query'], $params);

Could you make change here because a lot of projects are using this so I dont need to update everyone manually

Unauthorized (401)

Hi,
have trouble, with secure request.
I am using
$client = new JWTClient(Auth::user());
dump($client->post('/rest/api/2/search'.urlencode('?jql=updated > 2014-01-20 and project in (PC) and timespent > 0&fields=summary,worklog&maxResults=1000')));
I got 401, can you please help me with it? Interesting, what
dump($client->get('/rest/api/2/issue/TEST-13'));
works perfectly, problem in jira permissions?

Send JWTClient requests with a custom token

I have an angular app which is communicating with laravel.
On every call I send JWT and it passes middleware with auth.
On Laravel there is a tenant database with data from installed instance.
Is there a way that I can create new JWTClient($jwt) to current user.
Becouse JWTClient(Auth::user()) gives me login from tenant database.

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.