ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/jakarta/security/auth/message/MessagePolicy.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/jakarta/security/auth/message/MessagePolicy.java
Status
scanned
Type
file
Name
MessagePolicy.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2772 (2.7 KB)
MD5
480967d6e687b9cba43ba8bb14323e23
SHA1
c9918a2642d4c8b3e5bcd41061a55ec7d940346e
SHA256
d97b0cd25fd9603519db735f116603756ea8606ba3440fd533ac8e8a395471ff
SHA512

      
    
SHA1_git
5999896741dc8ec9f968e855c4dc913a4d5b0d11
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
MessagePolicy.java | 2.7 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package jakarta.security.auth.message; public class MessagePolicy { private final TargetPolicy[] targetPolicies; private final boolean mandatory; public MessagePolicy(TargetPolicy[] targetPolicies, boolean mandatory) { if (targetPolicies == null) { throw new IllegalArgumentException("targetPolicies is null"); } this.targetPolicies = targetPolicies; this.mandatory = mandatory; } public boolean isMandatory() { return mandatory; } public TargetPolicy[] getTargetPolicies() { if (targetPolicies.length == 0) { return null; } return targetPolicies; } public interface ProtectionPolicy { String AUTHENTICATE_SENDER = "#authenticateSender"; String AUTHENTICATE_CONTENT = "#authenticateContent"; String AUTHENTICATE_RECIPIENT = "#authenticateRecipient"; String getID(); } public interface Target { Object get(MessageInfo messageInfo); void remove(MessageInfo messageInfo); void put(MessageInfo messageInfo, Object data); } public static class TargetPolicy { private final Target[] targets; private final ProtectionPolicy protectionPolicy; public TargetPolicy(Target[] targets, ProtectionPolicy protectionPolicy) { if (protectionPolicy == null) { throw new IllegalArgumentException("protectionPolicy is null"); } this.targets = targets; this.protectionPolicy = protectionPolicy; } public Target[] getTargets() { if (targets == null || targets.length == 0) { return null; } return targets; } public ProtectionPolicy getProtectionPolicy() { return protectionPolicy; } } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
46.67
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9