Skip to content

Instantly share code, notes, and snippets.

View touhami92's full-sized avatar
☀️

Touhami Mansouri touhami92

☀️
View GitHub Profile
public String getStringJSON(docFullName, property){
this.setDocument(docFullName);
String propertyValue = this.theDoc.getValue(property, this.theObj);
if(!propertyValue || propertyValue == null) return "null";
def propertyArray = propertyValue.split(',');
String json = "[";
String tempProp;
Document tempDoc;
Object tempsObj;
from spyne.server.django import DjangoHttpMethodContext
def _get_user_from_http_header(ctx):
ctx_meta = ctx.transport.req.META if isinstance(ctx, DjangoHttpMethodContext) else ctx.META
if 'HTTP_AUTHORIZATION' not in ctx_meta:
raise MissingAuthenticationError()
auth_header = ctx_meta['HTTP_AUTHORIZATION']
try:
scheme, basic_creds = auth_header.split()