protected string ExtractSignedAuthorization(Microsoft.Cis.Services.Nephos.Common.RequestContext requestContext) { string authorizationScheme; string authorizationSchemeParameters; try { authorizationScheme = requestContext.AuthorizationScheme; authorizationSchemeParameters = requestContext.AuthorizationSchemeParameters; } catch (HttpRequestHeaderNotFoundException httpRequestHeaderNotFoundException) { throw new AuthenticationFailureException("Authorization header not found", httpRequestHeaderNotFoundException); } catch (HttpRequestInvalidHeaderException httpRequestInvalidHeaderException1) { HttpRequestInvalidHeaderException httpRequestInvalidHeaderException = httpRequestInvalidHeaderException1; throw new InvalidAuthenticationInfoException(httpRequestInvalidHeaderException.Message, httpRequestInvalidHeaderException); } catch (HttpRequestDuplicateHeaderException httpRequestDuplicateHeaderException) { throw new InvalidAuthenticationInfoException("Duplicate authorization headers found"); } if (string.IsNullOrEmpty(authorizationSchemeParameters) || string.IsNullOrEmpty(authorizationScheme) || !authorizationScheme.Equals("SignedKey")) { throw new AuthenticationFailureException(string.Concat("SignedKey scheme expected but found ", authorizationScheme)); } return(authorizationSchemeParameters); }
public SignedAccessHelper(Microsoft.Cis.Services.Nephos.Common.RequestContext requestContext, NephosUriComponents uriComponents) { NephosAssertionException.Assert(requestContext != null); NephosAssertionException.Assert(uriComponents != null); NephosAssertionException.Assert(requestContext.QueryParameters != null); this.QueryParams = requestContext.QueryParameters; this.RequestContext = requestContext; this.UriComponents = uriComponents; this.SignedProtocol = SasProtocol.All; }
public AuthenticationInformation(string authScheme, SupportedAuthScheme originalRequestAuthScheme, Collection <AuthDataEntry> authData, Microsoft.Cis.Services.Nephos.Common.RequestContext requestContext, NephosUriComponents uriComponents, bool isInterStampAuthentication) { this.authScheme = authScheme; this.authData = authData; this.requestContext = requestContext; this.uriComponents = uriComponents; this.authKeyName = null; if (originalRequestAuthScheme == SupportedAuthScheme.SignedKey && requestContext.QueryParameters["sv"] != null) { this.authKeyName = AuthenticationManagerHelper.ExtractKeyNameFromParamsWithConversion(requestContext.QueryParameters); if (this.authKeyName != null) { Logger <IRestProtocolHeadLogger> .Instance.Verbose.Log("Using secret key with KeyName '{0}' to authenticate SAS/DSAS.", new object[] { this.authKeyName }); } } }
public TableSignedAccessHelper(Microsoft.Cis.Services.Nephos.Common.RequestContext requestContext, NephosUriComponents uriComponents) : base(requestContext, uriComponents) { }
public void JustDecompileGenerated_set_RequestContext(Microsoft.Cis.Services.Nephos.Common.RequestContext value) { this.RequestContext = value; }
public AccountSasHelper(Microsoft.Cis.Services.Nephos.Common.RequestContext requestContext, NephosUriComponents uriComponents) : base(requestContext, uriComponents) { this.SignedService = SasService.None; this.SignedResourceType = SasResourceType.None; }
public BlobSignedAccessHelper(Microsoft.Cis.Services.Nephos.Common.RequestContext requestContext, NephosUriComponents uriComponents) : base(requestContext, uriComponents) { this.SignedResource = SASAccessLevel.None; }