1 | <?php |
||
28 | class MetadataBuilder |
||
29 | { |
||
30 | /** |
||
31 | * @var RouterInterface |
||
32 | */ |
||
33 | private $router; |
||
34 | |||
35 | /** |
||
36 | * @var Metadata |
||
37 | */ |
||
38 | private $metadata; |
||
39 | |||
40 | /** |
||
41 | * MetadataBuilder constructor. |
||
42 | * |
||
43 | * @param RouterInterface $router |
||
44 | */ |
||
45 | public function __construct(RouterInterface $router) |
||
50 | |||
51 | /** |
||
52 | * @return Metadata |
||
53 | */ |
||
54 | public function getMetadata(): Metadata |
||
58 | |||
59 | /** |
||
60 | * @param string $name |
||
61 | * @param string $routeName |
||
62 | * @param array $routeParameters |
||
63 | */ |
||
64 | public function addRoute(string $name, string $routeName, array $routeParameters = []) |
||
65 | { |
||
66 | $path = $this->router->generate($routeName, $routeParameters, RouterInterface::ABSOLUTE_URL); |
||
67 | $this->metadata->set($name, $path); |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @param PKCEMethodManager $PKCEMethodManager |
||
72 | */ |
||
73 | public function setCodeChallengeMethodsSupported(PKCEMethodManager $PKCEMethodManager) |
||
77 | |||
78 | /** |
||
79 | * @param ClientAssertionJwt $clientAssertionJwt |
||
80 | */ |
||
81 | public function setClientAssertionJwt(ClientAssertionJwt $clientAssertionJwt) |
||
87 | |||
88 | /** |
||
89 | * @param GrantTypeManager $grantTypeManager |
||
90 | */ |
||
91 | public function setGrantTypeManager(GrantTypeManager $grantTypeManager) |
||
95 | |||
96 | /** |
||
97 | * @param ResponseTypeManager $responseTypeManager |
||
98 | */ |
||
99 | public function setResponseTypeManager(ResponseTypeManager $responseTypeManager) |
||
103 | |||
104 | /** |
||
105 | * @param ResponseModeManager $responseModeManager |
||
106 | */ |
||
107 | public function setResponseModeManager(ResponseModeManager $responseModeManager) |
||
111 | |||
112 | /** |
||
113 | * @param AuthenticationMethodManager $tokenEndpointAuthMethodManager |
||
114 | */ |
||
115 | public function setTokenEndpointAuthMethodManager(AuthenticationMethodManager $tokenEndpointAuthMethodManager) |
||
119 | |||
120 | /** |
||
121 | * @param ScopeRepository $scopeRepository |
||
122 | */ |
||
123 | public function setScopeRepository(ScopeRepository $scopeRepository) |
||
127 | |||
128 | /** |
||
129 | * @param UserInfo $userInfo |
||
130 | */ |
||
131 | public function setUserinfo(UserInfo $userInfo) |
||
136 | |||
137 | /** |
||
138 | * @param string $name |
||
139 | * @param mixed $value |
||
140 | */ |
||
141 | public function addKeyValuePair(string $name, $value) |
||
145 | |||
146 | /** |
||
147 | * @param AuthorizationRequestLoader $authorizationRequestLoader |
||
148 | */ |
||
149 | public function setAuthorizationRequestLoader(AuthorizationRequestLoader $authorizationRequestLoader) |
||
161 | } |
||
162 |