File: htfile.pyi

package info (click to toggle)
trac-accountmanager 0.6.1%2Bsvn18669-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,552 kB
  • sloc: python: 6,863; javascript: 175; makefile: 4
file content (37 lines) | stat: -rw-r--r-- 1,328 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from typing import Optional

from trac.core import Component


def _eachline(filename: str, encoding: str = 'utf-8'): ...


def _writelines(filename: str, lines, encoding: str = 'utf-8'): ...


class AbstractPasswordFileStore(Component):

    def has_user(self, user: str) -> bool: ...
    def get_users(self) -> [str]: ...
    def set_password(self, user: str, password: str, old_password: str = None, overwrite: bool = True) -> bool: ...
    def delete_user(self, user: str) -> bool: ...
    def check_password(self, user: str, password: str) -> Optional[bool]: ...
    def _update_file(self, prefix: str, userline: Optional[str], overwrite: bool = True) -> bool: ...


class HtPasswdStore(AbstractPasswordFileStore):

    def config_key(self) -> str: ...
    def prefix(self, user: str) -> str: ...
    def userline(self, user: str, password: str) -> str: ...
    def _check_userline(self, user: str, password: str, suffix: str) -> bool: ...
    def _get_users(self, filename: str) -> [str]: ...


class HtDigestStore(AbstractPasswordFileStore):

    def config_key(self) -> str: ...
    def prefix(self, user: str) -> str: ...
    def userline(self, user: str, password: str) -> str: ...
    def _check_userline(self, user: str, password: str, suffix: str) -> bool: ...
    def _get_users(self, filename: str) -> [str]: ...