config/atp-client.php
config/client.php
config/atp-client.php
config/client.php
+6
-6
src/AtpClientServiceProvider.php
+6
-6
src/AtpClientServiceProvider.php
···
24
24
*/
25
25
public function register(): void
26
26
{
27
-
$this->mergeConfigFrom(__DIR__.'/../config/atp-client.php', 'atp-client');
27
+
$this->mergeConfigFrom(__DIR__.'/../config/client.php', 'atp-client');
28
28
29
29
// Register contracts
30
30
$this->app->singleton(CredentialProvider::class, function ($app) {
31
-
$provider = config('atp-client.credential_provider');
31
+
$provider = config('client.credential_provider');
32
32
33
33
return new $provider();
34
34
});
···
51
51
dpopManager: $app->make(DPoPKeyManager::class),
52
52
keyStore: $app->make(KeyStore::class),
53
53
http: $app->make('http'),
54
-
refreshThreshold: config('atp-client.session.refresh_threshold', 300),
54
+
refreshThreshold: config('client.session.refresh_threshold', 300),
55
55
);
56
56
});
57
57
$this->app->singleton(OAuthEngine::class);
···
107
107
{
108
108
if ($this->app->runningInConsole()) {
109
109
$this->publishes([
110
-
__DIR__.'/../config/atp-client.php' => config_path('atp-client.php'),
110
+
__DIR__.'/../config/client.php' => config_path('client.php'),
111
111
], 'atp-client-config');
112
112
113
113
$this->commands([
···
123
123
*/
124
124
protected function registerRoutes(): void
125
125
{
126
-
if (config('atp-client.oauth.disabled')) {
126
+
if (config('client.oauth.disabled')) {
127
127
return;
128
128
}
129
129
130
-
$prefix = config('atp-client.oauth.prefix', '/atp/oauth/');
130
+
$prefix = config('client.oauth.prefix', '/atp/oauth/');
131
131
132
132
Route::prefix($prefix)->group(function () {
133
133
Route::get('client-metadata.json', ClientMetadataController::class)
+6
-6
src/Auth/ClientMetadataManager.php
+6
-6
src/Auth/ClientMetadataManager.php
···
9
9
*/
10
10
public function getClientId(): string
11
11
{
12
-
return config('atp-client.client.url');
12
+
return config('client.client.url');
13
13
}
14
14
15
15
/**
···
17
17
*/
18
18
public function getMetadataUrl(): ?string
19
19
{
20
-
return config('atp-client.client.metadata_url');
20
+
return config('client.client.metadata_url');
21
21
}
22
22
23
23
/**
···
27
27
*/
28
28
public function getRedirectUris(): array
29
29
{
30
-
return config('atp-client.client.redirect_uris', []);
30
+
return config('client.client.redirect_uris', []);
31
31
}
32
32
33
33
/**
···
37
37
*/
38
38
public function getScopes(): array
39
39
{
40
-
return config('atp-client.client.scopes', ['atproto', 'transition:generic']);
40
+
return config('client.client.scopes', ['atproto', 'transition:generic']);
41
41
}
42
42
43
43
/**
···
49
49
{
50
50
return [
51
51
'client_id' => $this->getClientId(),
52
-
'client_name' => config('atp-client.client.name'),
53
-
'client_uri' => config('atp-client.client.url'),
52
+
'client_name' => config('client.client.name'),
53
+
'client_uri' => config('client.client.url'),
54
54
'redirect_uris' => $this->getRedirectUris(),
55
55
'scope' => implode(' ', $this->getScopes()),
56
56
'grant_types' => [
+1
-1
src/Auth/OAuthKey.php
+1
-1
src/Auth/OAuthKey.php
···
12
12
*/
13
13
public static function load(?string $private = null): static
14
14
{
15
-
$private ??= config('atp-client.oauth.private_key');
15
+
$private ??= config('client.oauth.private_key');
16
16
17
17
throw_if(empty($private), InvalidArgumentException::class, 'OAuth private key not configured. Run: php artisan atp-client:generate-key');
18
18
+3
-3
src/Http/Config/OAuthMetadata.php
+3
-3
src/Http/Config/OAuthMetadata.php
···
28
28
if (static::$clientMetadataUsing) {
29
29
$stored = call_user_func(static::$clientMetadataUsing);
30
30
} else {
31
-
$stored = config('atp-client.oauth.client_metadata', []);
31
+
$stored = config('client.oauth.client_metadata', []);
32
32
}
33
33
34
34
// Base metadata that should always be present
35
35
$base = [
36
36
'client_id' => route('atp.oauth.client-metadata'),
37
37
'jwks_uri' => route('atp.oauth.jwks'),
38
-
'redirect_uris' => config('atp-client.client.redirect_uris', []),
39
-
'scope' => config('atp-client.oauth.scope', 'atproto transition:generic'),
38
+
'redirect_uris' => config('client.client.redirect_uris', []),
39
+
'scope' => config('client.oauth.scope', 'atproto transition:generic'),
40
40
'grant_types' => ['authorization_code', 'refresh_token'],
41
41
'response_types' => ['code'],
42
42
'token_endpoint_auth_method' => 'private_key_jwt',