mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Set automaticly the Authentication params when JMS Secure annotation is set
This commit is contained in:
parent
0aa1619c5f
commit
fdc814e264
@ -28,6 +28,8 @@ class ApiDocExtractor
|
||||
|
||||
const FOS_REST_REQUEST_PARAM_CLASS = 'FOS\\RestBundle\\Controller\\Annotations\\RequestParam';
|
||||
|
||||
const JMS_SECURITY_EXTRA_SECURE_CLASS = 'JMS\\SecurityExtraBundle\\Annotation\\Secure';
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
@ -360,6 +362,8 @@ class ApiDocExtractor
|
||||
'description' => $annot->description,
|
||||
'readonly' => false
|
||||
));
|
||||
} elseif (is_a($annot, self::JMS_SECURITY_EXTRA_SECURE_CLASS)) {
|
||||
$annotation->setAuthentication(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user