File tree Expand file tree Collapse file tree
apps/settings/lib/Controller
private/Authentication/Exceptions
public/Authentication/Exceptions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353use Psr \Log \LoggerInterface ;
5454
5555class AuthSettingsController extends Controller {
56-
5756 /** @var IProvider */
5857 private $ tokenProvider ;
5958
6059 /** @var ISession */
6160 private $ session ;
6261
63- /** IUserSession */
62+ /** @var IUserSession */
6463 private $ userSession ;
6564
6665 /** @var string */
Original file line number Diff line number Diff line change 2525 */
2626namespace OC \Authentication \Exceptions ;
2727
28+ use OC \Authentication \Token \IToken ;
29+
2830/**
2931 * @deprecated 28.0.0 use OCP version instead
3032 */
3133class ExpiredTokenException extends \OCP \Authentication \Exceptions \ExpiredTokenException {
34+ public function __construct (
35+ IToken $ token ,
36+ ) {
37+ parent ::__construct ($ token );
38+ }
39+
40+ public function getToken (): IToken {
41+ $ token = parent ::getToken ();
42+ /** @var IToken $token We know that we passed OC interface from constructor */
43+ return $ token ;
44+ }
3245}
Original file line number Diff line number Diff line change 2525 */
2626namespace OC \Authentication \Exceptions ;
2727
28+ use OC \Authentication \Token \IToken ;
29+
2830/**
2931 * @deprecated 28.0.0 use OCP version instead
3032 */
3133class WipeTokenException extends \OCP \Authentication \Exceptions \WipeTokenException {
34+ public function __construct (
35+ IToken $ token ,
36+ ) {
37+ parent ::__construct ($ token );
38+ }
39+
40+ public function getToken (): IToken {
41+ $ token = parent ::getToken ();
42+ /** @var IToken $token We know that we passed OC interface from constructor */
43+ return $ token ;
44+ }
3245}
Original file line number Diff line number Diff line change 2727
2828use OCP \Authentication \Token \IToken ;
2929
30+ /**
31+ * @since 28.0
32+ */
3033class ExpiredTokenException extends InvalidTokenException {
34+ /**
35+ * @since 28.0
36+ */
3137 public function __construct (
3238 private IToken $ token ,
3339 ) {
3440 parent ::__construct ();
3541 }
3642
43+ /**
44+ * @since 28.0
45+ */
3746 public function getToken (): IToken {
3847 return $ this ->token ;
3948 }
Original file line number Diff line number Diff line change 2626
2727use Exception ;
2828
29+ /**
30+ * @since 28.0
31+ */
2932class InvalidTokenException extends Exception {
3033}
Original file line number Diff line number Diff line change 2727
2828use OCP \Authentication \Token \IToken ;
2929
30+ /**
31+ * @since 28.0
32+ */
3033class WipeTokenException extends InvalidTokenException {
34+ /**
35+ * @since 28.0
36+ */
3137 public function __construct (
3238 private IToken $ token ,
3339 ) {
3440 parent ::__construct ();
3541 }
3642
43+ /**
44+ * @since 28.0
45+ */
3746 public function getToken (): IToken {
3847 return $ this ->token ;
3948 }
You can’t perform that action at this time.
0 commit comments