Home | Trees | Indices | Help |
|
---|
|
1 #!/usr/bin/python 2 # 3 # Copyright (c) 2010 Red Hat, Inc. 4 # 5 # This software is licensed to you under the GNU General Public License, 6 # version 2 (GPLv2). There is NO WARRANTY for this software, express or 7 # implied, including the implied warranties of MERCHANTABILITY or FITNESS 8 # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 9 # along with this software; if not, see 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 11 # 12 # Red Hat trademarks are not licensed under GPLv2. No permission is 13 # granted to use or replicate Red Hat trademarks that are incorporated 14 # in this software or its documentation. 15 16 import logging 17 18 from pulp.server.api.base import BaseApi 19 from pulp.server.auditing import audit 20 import pulp.server.auth.auth as principal 21 import pulp.server.auth.cert_generator as cert_generator 22 23 24 LOG = logging.getLogger(__name__)28 31 35 36 @audit()5138 ''' 39 Generates an admin authentication certificate for the currently logged in 40 user. 41 42 @return: tuple of the private key and certificate 43 @rtype: (string, string) 44 ''' 45 46 # Get the currently logged in user 47 user = principal.get_principal() 48 49 private_key, cert = cert_generator.make_admin_user_cert(user) 50 return private_key, cert
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Sep 7 12:30:36 2010 | http://epydoc.sourceforge.net |