ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/realm/AuthenticatedUserRealm.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/realm/AuthenticatedUserRealm.java
Status
scanned
Type
file
Name
AuthenticatedUserRealm.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
1898 (1.9 KB)
MD5
9e5bfd53dc7333fa7421827b0be61a9e
SHA1
9dd3c89655c196fa90de26e22d075de04fffad4f
SHA256
24769cac3f5e13e4cf99139f5360374d7d7b0af7eec27a78268bcd81e02bf520
SHA512

      
    
SHA1_git
7ad3b170f29ba6952ae036b9b8a42307bad11a06
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
AuthenticatedUserRealm.java | 1.9 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 org.apache.catalina.realm; import java.security.Principal; /** * This Realm is intended for use with Authenticator implementations * ({@link org.apache.catalina.authenticator.SSLAuthenticator}, * {@link org.apache.catalina.authenticator.SpnegoAuthenticator}) that authenticate the user as well as obtain the user * credentials. An authenticated Principal is always created from the username presented to without further validation. * <p> * <strong>Note:</strong> It is unsafe to use this Realm with Authenticator implementations that do not validate the * provided credentials. */ public class AuthenticatedUserRealm extends RealmBase { @Override protected String getPassword(String username) { // Passwords never need validating so always return null return null; } @Override protected Principal getPrincipal(String username) { // The authentication mechanism has authenticated the user so create // the Principal directly return new GenericPrincipal(username); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
50.42
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