JAVA EXAMPLE PROGRAMS

JAVA EXAMPLE PROGRAMS

Publish Your Article Here

What is HTTP basic authentication?


Answer:

In the context of a HTTP transaction, basic access authentication is a method for an HTTP user agent to provide a user name and password when making a request.

HTTP Basic authentication implementation is the simplest technique for enforcing access controls to web resources because it doesn't require cookies, session identifier and login pages. Rather, HTTP Basic authentication uses static, standard HTTP headers which means that no handshakes have to be done in anticipation.

When the user agent wants to send the server authentication credentials it may use the Authorization header. The Authorization header is constructed as follows:

1) Username and password are combined into a string "username:password"
2) The resulting string is then encoded using Base64 encoding
3) The authorization method and a space i.e. "Basic " is then put before the encoded string.

For example, if the user agent uses 'Aladdin' as the username and 'open sesame' as the password then the header is formed as follows:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
<< Previous Question | Next Question >>

List Of Java Interview Questions:

  1. Previous set of java interview questions
  2. What is difference between Lambda Expression and Anonymous class?
  3. What is HTTP basic authentication?
  4. What is functional interface in java?
  5. What is the difference between HTTP methods GET and POST?
  6. What is difference between CountDownLatch and CyclicBarrier in Java?
  7. Can Enum extend any class in Java?
  8. Can Enum implements any interface in Java?
  9. Can we have constructor in abstract class?
  10. What is MVC pattern?
  11. What is ActionServlet in struts?
  12. What is the difference between servlet & Filter?
  13. What is ActionMapping in struts?
  14. What is the difference between application server and web server?
  15. What is the difference between JPA and Hibernate?
  16. What is difference between the Value Object and JDO?
  17. How Struts control data flow?
  18. What is Spring?
  19. What is Dependency Injection?
  20. What are the different types of dependency injections in spring?
  21. What is BeanFactory in Spring?
  22. What is difference between BeanFactory and ApplicationContext in spring?
  23. How to make a bean as singleton in spring?
  24. What is IOC or inversion of control?
  25. What are different types of spring auto-wiring modes?
  26. What are the limitations and disadvantages of spring autowiring?
  27. Is the spring singleton bean thread safe?
  28. Why ConcurrentHashMap is faster than Hashtable in Java?
  29. What is the difference between ConcurrentHashMap and Hashtable in Java?
  30. Difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?
  31. What is the difference between ORM, JPA and Hibernate?
  32. What is stream pipelining in Java 8?
  33. What is interface default method in java 8?
  34. Java-8: Interface with default methods vs Abstract class.
  35. What is @SpringBootApplication annotation in Spring boot project?
  36. What Embedded Containers Does Spring Boot Support?
  37. What are the advantages and disadvantages of Spring Boot?
  38. What is Spring Boot Actuator?
  39. What is Spring Boot Initializr?
  40. How does Maven resolve version conflicts of dependencies?
  41. How to reload Spring Boot Application without restarting server?
  42. What is the difference between Spring Boot and the Spring framework?
  43. What are the key components of Spring Boot framework?
  44. What are the different types of bean scope in Spring framework?
  45. What are the standard Spring build-in events?
  46. What is Spring IoC container?
  47. Differences between BeanFactory and the ApplicationContext in Spring framework.
  48. Difference between constructor injection and setter injection in Spring.
  49. How Java-8 Streams differ from collections
  50. What are the various ways to obtain Streams in Java-8?
  51. List Java-8 Streams intermediate operations.
  52. List Java-8 Streams terminal operations.
  53. Can we reuse Java-8 Streams?
  54. Difference between map and flatMap methods in Java 8
  55. What is the difference between Closure and Lambda in Java 8?
  56. Does Java 8 Lambda supports recursive call?
  57. Can Java 8 default methods override equals, hashCode and toString?
  58. Hibernate Eager vs Lazy Fetch Type
  59. What is POJO?
  60. What is HQL (Hibernate Query Language)?
Knowledge Centre
What is servlet context?
The servlet context is an interface which helps to communicate with other servlets. It contains information about the Web application and container. It is kind of application environment. Using the context, a servlet can obtain URL references to resources, and store attributes that other servlets in the context can use.
Famous Quotations
The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails.
-- William Arthur Ward

About Author

I'm Nataraja Gootooru, programmer by profession and passionate about technologies. All examples given here are as simple as possible to help beginners. The source code is compiled and tested in my dev environment.

If you come across any mistakes or bugs, please email me to [email protected].

Most Visited Pages

Other Interesting Sites

Reference: Java™ Platform Standard Ed. 7 - API Specification | Java™ Platform Standard Ed. 8 - API Specification | Java is registered trademark of Oracle.
Privacy Policy | Copyright © 2022 by Nataraja Gootooru. All Rights Reserved.