You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/Http/Controllers/OAuth2/OAuth2ProviderController.php
+14-20Lines changed: 14 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
<?phpnamespaceApp\Http\Controllers\OAuth2;
1
+
<?php
2
+
namespaceApp\Http\Controllers\OAuth2;
2
3
/**
3
4
* Copyright 2015 OpenStack Foundation
4
5
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -64,8 +65,7 @@ public function __construct
64
65
IOAuth2Protocol$oauth2_protocol,
65
66
IClientRepository$client_repository,
66
67
IAuthService$auth_service
67
-
)
68
-
{
68
+
) {
69
69
$this->oauth2_protocol = $oauth2_protocol;
70
70
$this->auth_service = $auth_service;
71
71
$this->client_repository = $client_repository;
@@ -85,23 +85,18 @@ public function __construct
85
85
description: 'Initiates an OAuth2 authorization flow. Supports Authorization Code, Implicit, Hybrid, and OpenID Connect flows. Per RFC 6749 §3.1, GET is required.',
newOA\Parameter(name: 'response_type', in: 'query', required: true, description: 'The OAuth 2.0 specification allows for registration of space-separated response_type parameter values. If a Response Type contains one of more space characters (%20), it is compared as a space-delimited list of values in which the order of values does not matter. Possible values are: code, token, id_token, otp, none. The "none" value cannot be used with any other response type value.', schema: newOA\Schema(type: 'string')),
newOA\Parameter(name: 'state', in: 'query', required: false, description: 'Opaque state parameter returned in the redirect', schema: newOA\Schema(type: 'string')),
93
-
newOA\Parameter(name: 'nonce', in: 'query', required: false, description: 'Nonce for ID token replay protection (OIDC)', schema: newOA\Schema(type: 'string')),
newOA\Parameter(name: 'approval_prompt', in: 'query', required: false, description: 'Indicates whether the user should be re-prompted for consent. The default is auto, so a given user should only see the consent page for a given set of scopes the first time through the sequence. If the value is force, then the user sees a consent page even if they previously gave consent to your application for a given set of scopes.', enum: ['auto', 'force'], schema: newOA\Schema(type: 'string', enum: ['auto', 'force'])),
94
+
newOA\Parameter(name: 'access_type', in: 'query', required: false, description: 'Indicates whether your application needs to access an API when the user is not present at the browser. This parameter defaults to online. If your application needs to refresh access tokens when the user is not present at the browser, then use offline. This will result in your application obtaining a refresh token the first time your application exchanges an authorization code for a user.', schema: newOA\Schema(type: 'string', enum: ['online', 'offline'])),
95
+
newOA\Parameter(name: 'response_mode', in: 'query', required: false, description: 'OPTIONAL. Informs the Authorization Server of the mechanism to be used for returning Authorization Response parameters from the Authorization Endpoint. This use of this parameter is NOT RECOMMENDED with a value that specifies the same Response Mode as the default Response Mode for the Response Type used.\nThe default Response Mode for the OAuth 2.0 code Response Type is the query encoding. For purposes of this specification, the default Response Mode for the OAuth 2.0 token Response Type is the fragment encoding.', schema: newOA\Schema(type: 'string', enum: ['query', 'fragment', 'form_post', 'direct'])),
newOA\Response(response: HttpResponse::HTTP_OK, description: 'Authorization request processed (response in body), depends on "response_mode" param'),
@@ -255,7 +250,6 @@ public function auth()
255
250
summary: 'OAuth2 Token Endpoint',
256
251
description: 'Issues access tokens. Supports authorization_code, client_credentials, password, refresh_token, and passwordless grant types.',
257
252
tags: ['OAuth2 / OpenID Connect'],
258
-
security: [['OAuth2ProviderSecurity' => []]],
259
253
requestBody: newOA\RequestBody(
260
254
description: 'Token request parameters',
261
255
required: true,
@@ -423,7 +417,7 @@ public function certs()
423
417
path: '/.well-known/openid-configuration',
424
418
operationId: 'oauth2Discovery',
425
419
summary: 'OpenID Connect Discovery Endpoint',
426
-
description: 'Returns the OpenID Provider Configuration document per OpenID Connect Discovery 1.0. Also available at /oauth2/.well-known/openid-configuration.',
420
+
description: 'Returns the OpenID Provider Configuration document per OpenID Connect Discovery 1.0.',
newOA\Property(property: 'response_type', type: 'string', description: 'The OAuth 2.0 specification allows for registration of space-separated response_type parameter values. If a Response Type contains one of more space characters (%20), it is compared as a space-delimited list of values in which the order of values does not matter. Possible values are: code, token, id_token, otp, none. The "none" value cannot be used with any other response type value.'),
newOA\Property(property: 'approval_prompt', type: 'string', description: 'Indicates whether the user should be re-prompted for consent. The default is auto, so a given user should only see the consent page for a given set of scopes the first time through the sequence. If the value is force, then the user sees a consent page even if they previously gave consent to your application for a given set of scopes.', enum: ['auto', 'force']),
20
+
newOA\Property(property: 'access_type', type: 'string', description: 'Indicates whether your application needs to access an API when the user is not present at the browser. This parameter defaults to online. If your application needs to refresh access tokens when the user is not present at the browser, then use offline. This will result in your application obtaining a refresh token the first time your application exchanges an authorization code for a user.'),
21
+
newOA\Property(property: 'response_mode', type: 'string', description: 'OPTIONAL. Informs the Authorization Server of the mechanism to be used for returning Authorization Response parameters from the Authorization Endpoint. This use of this parameter is NOT RECOMMENDED with a value that specifies the same Response Mode as the default Response Mode for the Response Type used.\nThe default Response Mode for the OAuth 2.0 code Response Type is the query encoding. For purposes of this specification, the default Response Mode for the OAuth 2.0 token Response Type is the fragment encoding.', enum: ['query', 'fragment', 'form_post', 'direct']),
0 commit comments