Code Duplication    Length = 11-13 lines in 2 locations

apps/dav/lib/Connector/PublicAuth.php 1 location

@@ 62-72 (lines=11) @@
59
	 * @param IManager $shareManager
60
	 * @param ISession $session
61
	 */
62
	public function __construct(IRequest $request,
63
								IManager $shareManager,
64
								ISession $session) {
65
		$this->request = $request;
66
		$this->shareManager = $shareManager;
67
		$this->session = $session;
68
69
		// setup realm
70
		$defaults = new \OCP\Defaults();
71
		$this->realm = $defaults->getName();
72
	}
73
74
	/**
75
	 * Validates a username and password

apps/dav/lib/Connector/Sabre/BearerAuth.php 1 location

@@ 47-59 (lines=13) @@
44
	 * @param string $principalPrefix
45
	 * @param IRequest $request
46
	 */
47
	public function __construct(IUserSession $userSession,
48
								ISession $session,
49
								IRequest $request,
50
								$principalPrefix = 'principals/users/') {
51
		$this->userSession = $userSession;
52
		$this->session = $session;
53
		$this->request = $request;
54
		$this->principalPrefix = $principalPrefix;
55
56
		// setup realm
57
		$defaults = new \OCP\Defaults();
58
		$this->realm = $defaults->getName();
59
	}
60
61
	private function setupUserFs($userId) {
62
		\OC_Util::setupFS($userId);