Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

string.Equals

protected virtual bool ShouldCopyHeaderToServerRequest(string headerName) {
  return !string.Equals(headerName, "X-CommonAccessToken", OrdinalIgnoreCase) 
      && !string.Equals(headerName, "X-IsFromCafe", OrdinalIgnoreCase) 
      && !string.Equals(headerName, "X-SourceCafeServer", OrdinalIgnoreCase) 
      && !string.Equals(headerName, "msExchProxyUri", OrdinalIgnoreCase) 
      && !string.Equals(headerName, "X-MSExchangeActivityCtx", OrdinalIgnoreCase) 
      && !string.Equals(headerName, "return-client-request-id", OrdinalIgnoreCase) 
      && !string.Equals(headerName, "X-Forwarded-For", OrdinalIgnoreCase) 
      && (!headerName.StartsWith("X-Backend-Diag-", OrdinalIgnoreCase) 
      || this.ClientRequest.GetHttpRequestBase().IsProbeRequest());
}
Comment

string.Equals

private void OnAuthenticateRequest(object source, EventArgs args) {
    if (httpContext.Request.IsAuthenticated) {
        this.ProcessRequest(httpContext);
    }
}

private void ProcessRequest(HttpContext httpContext) {
    CommonAccessToken token;
    if (this.TryGetCommonAccessToken(httpContext, out token)) {
        // ...
    }
}

private bool TryGetCommonAccessToken(HttpContext httpContext, out CommonAccessToken token) {
    string text = httpContext.Request.Headers["X-CommonAccessToken"];
    if (string.IsNullOrEmpty(text)) {
        return false;
    }
        
    bool flag;
    try {
        flag = this.IsTokenSerializationAllowed(httpContext.User.Identity as WindowsIdentity);
    } finally {
        httpContext.Items["BEValidateCATRightsLatency"] = stopwatch.ElapsedMilliseconds - elapsedMilliseconds;
    }

    token = CommonAccessToken.Deserialize(text);
    httpContext.Items["Item-CommonAccessToken"] = token;
    
    //...
}

private bool IsTokenSerializationAllowed(WindowsIdentity windowsIdentity) {
   flag2 = LocalServer.AllowsTokenSerializationBy(clientSecurityContext);
   return flag2;
}

private static bool AllowsTokenSerializationBy(ClientSecurityContext clientContext) {
    return LocalServer.HasExtendedRightOnServer(clientContext, 
        WellKnownGuid.TokenSerializationRightGuid);  // ms-Exch-EPI-Token-Serialization

}
Comment

PREVIOUS NEXT
Code Example
Java :: java static nested class 
Java :: signed and unsigned data types in java 
Java :: android capture view and animation 
Java :: findng and replacing duplicate values in an array 
Java :: edit data from database sqlite android 
Java :: convert text type to int java 
Java :: hello world in bukkit 
Java :: android dynamically create layer-list with item and shape site:stackoverflow.com 
Java :: how to apply validation on aiphanumeric series starting with 4 characters with 4 letters in java 
Java :: java print data and check in android studio 
Java :: Java Change values of variables 
Java :: java find nth largest element using priority queue heap 
Java :: java oop design patterns 
Java :: java tcp readline not working 
Java :: chipview library android 
Java :: how to clear cli screen 
Java :: how to generate randome number in desired range java 
Java :: get cursor position in textarea java 
Java :: sibling search java program 
Java :: How to code the Fibonacci Sequence using simple iterative loops java 
Java :: for each loop summation 
Java :: add words from string to collection java 
Java :: public class MyClass { public static void main(String[] args) { System.out.println("Hello World"); } } 
Java :: android studio enum usage 
Java :: JAVA for-each Loop Sytnax 
Java :: Converting data in java 
Java :: JUnit5 @Test method whose data comes from dataForTestSearchString 
Java :: fibonacci numbers using recursion in java 
Java :: problemi arrayList javafx 
Java :: get top 3 entries based on values map java 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =