Utilities
- DIRAC.FrameworkSystem.private.authorization.utils.Utilities.collectMetadata(issuer=None, ignoreErrors=False)
Collect metadata for DIRAC Authorization Server(DAS), a metadata format defined by the IETF specification: https://datatracker.ietf.org/doc/html/rfc8414#section-2
- Parameters:
issuer (str) – issuer to set
- Returns:
dict – dictionary is the AuthorizationServerMetadata object in the same time
- DIRAC.FrameworkSystem.private.authorization.utils.Utilities.getHTML(title, info=None, body=None, style=None, state=None, theme=None, icon=None)
Provide HTML object
- Parameters:
title (str) – short name of the notification, e.g.: server error
info (str) – some short description if needed, e.g.: It looks like the server is not responding
body – it can be string or dominate tag object, e.g.: from dominate import tags as dom return getHTML(‘server error’, body=dom.pre(dom.code(result[‘Message’]))
style (str) – additional css style if needed, e.g.: ‘.card{color:red;}’
state (int) – response state code, if needed, e.g.: 404
theme (str) – message color theme, the same that in bootstrap 5, e.g.: ‘warning’
icon (str) – awesome icon name, e.g.: ‘users’
- Returns:
str – HTML document