File tree Expand file tree Collapse file tree 6 files changed +1
-44
lines changed
src/DIRAC/FrameworkSystem Expand file tree Collapse file tree 6 files changed +1
-44
lines changed Original file line number Diff line number Diff line change 1
1
""" AuthDB class is a front-end to the AuthDB MySQL Database (via SQLAlchemy)
2
2
"""
3
- from __future__ import absolute_import
4
- from __future__ import division
5
- from __future__ import print_function
6
-
7
3
import json
8
4
import time
9
5
import pprint
13
9
from sqlalchemy .orm .exc import MultipleResultsFound , NoResultFound
14
10
from sqlalchemy .ext .declarative import declarative_base
15
11
16
- import authlib
17
12
from authlib .jose import KeySet , JsonWebKey
18
13
from authlib .common .security import generate_token
19
14
20
15
from DIRAC import S_OK , S_ERROR
21
16
from DIRAC .Core .Base .SQLAlchemyDB import SQLAlchemyDB
22
17
from DIRAC .FrameworkSystem .private .authorization .utils .Tokens import OAuth2Token
23
18
24
- __RCSID__ = "$Id$"
25
-
26
19
27
20
Model = declarative_base ()
28
21
Original file line number Diff line number Diff line change 1
1
""" This class provides authorization server activity. """
2
- from __future__ import absolute_import
3
- from __future__ import division
4
- from __future__ import print_function
5
-
6
2
import re
7
3
import six
8
4
import json
Original file line number Diff line number Diff line change 1
- from __future__ import absolute_import
2
- from __future__ import division
3
- from __future__ import print_function
4
-
5
1
import six
6
2
import time
7
- import pprint
8
3
9
- from DIRAC import gConfig , gLogger
4
+ from DIRAC import gLogger
10
5
from authlib .oauth2 .rfc6749 .util import scope_to_list , list_to_scope
11
6
from authlib .integrations .sqla_oauth2 import OAuth2ClientMixin
12
7
from DIRAC .ConfigurationSystem .Client .Utilities import getAuthorizationServerMetadata
13
8
14
- __RCSID__ = "$Id$"
15
9
16
10
# Description of default DIRAC OAuth2 clients
17
11
DEFAULT_CLIENTS = {
Original file line number Diff line number Diff line change 1
- from __future__ import absolute_import
2
- from __future__ import division
3
- from __future__ import print_function
4
-
5
1
import re
6
2
7
3
from tornado .escape import json_decode
10
6
from authlib .oauth2 .rfc6749 .util import scope_to_list
11
7
from urllib .parse import quote
12
8
13
- __RCSID__ = "$Id$"
14
-
15
9
16
10
class OAuth2Request (_OAuth2Request ):
17
11
"""OAuth2 request object"""
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
- ########################################################################
3
- # File : dirac-login.py
4
- # Author : Andrii Lytovchenko
5
- ########################################################################
6
2
"""
7
3
With this command you can log in to DIRAC.
8
4
20
16
# Return token
21
17
$ dirac-login dirac_user --token
22
18
"""
23
- from __future__ import division
24
- from __future__ import absolute_import
25
- from __future__ import print_function
26
-
27
19
import os
28
20
import sys
29
21
import copy
45
37
getTokenFileLocation ,
46
38
)
47
39
48
- __RCSID__ = "$Id$"
49
-
50
40
51
41
class Params (object ):
52
42
"""This class describes the input parameters"""
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
- ########################################################################
3
- # File : dirac-logout.py
4
- # Author : Andrii Lytovchenko
5
- ########################################################################
6
2
"""
7
3
Logout
8
4
9
5
Example:
10
6
$ dirac-logout
11
7
"""
12
- from __future__ import division
13
- from __future__ import absolute_import
14
- from __future__ import print_function
15
-
16
8
import os
17
9
import sys
18
10
28
20
BEARER_TOKEN_ENV ,
29
21
)
30
22
31
- __RCSID__ = "$Id$"
32
-
33
23
34
24
class Params (object ):
35
25
def __init__ (self ):
You can’t perform that action at this time.
0 commit comments