Spring Boot Security - UserDetailsService & AuthenticationManager

preview_player
Показать описание
Spring Boot Security - UserDetailsService & AuthenticationManager

Рекомендации по теме
Комментарии
Автор

Justin: good tutorial. To the point, consistent and good information.

mabreeeee
Автор

Thank you very much for the playlist. Helped me understand Spring security. I've been struggling to finf the right material for a long time now. Thank you!!

InvokeDynamics
Автор

Thank you, Teddy. Great class, as always.

Devivl
Автор

good tutorial. To the point, consistent and good information.

Justin-xyko
Автор

Also is this based on Chad's Spring Boot 3, Spring 6 & Hibernate for Beginners on Udemy?

If so, I'm glad you're explaining it, on the bonus PDFs, they are straightforward, but for newbies, having someone gloss over it, walkthrough it, and explain things the way you do is great.

If not, disregard haha!

TheGoodOleDays
Автор

what if i do not make a separate Role class but added a String role with default values "USER" and "ADMIN" to the UserEntity and Admin entity. Then what should i change from your instructions

bonreels
Автор

really good job man, thank you so much for your works

azizkale
Автор

Hey there, I’m running into this issue where my SecurityContextHolder (i.e., currently logged in user) is returning null even after setting it accordingly. In one controller, it works. In another controller it doesn’t. How can I persist this such that the current logged in user is accessible from any endpoint?

abdirahmanabdirahman
Автор

Dude I recommend you during typing when IDE autosugests you to import specific classes methods etc. just press enter keyboard and that specific class will import automatically at once. Just don't go back every time and fix that error. Learn use IDE efficiently. And what about tutorial it is so wonderful.

aliksargsyan
Автор

'csrf()' is deprecated since version 6.1 and marked for removal

Yahya_etr
Автор

why you use @Autowired with constructor?

hamzaelbouzidi
Автор

thank you for this good tutorial, I also appreciate the tool with which you have schematized your explanations, can you please share with us the name of this program

temrimoose
Автор

Great video.

I have this error in the CustomerUserDetailsService:

The method getUsername() is undefined for the type UserEntity
The method getPassword() is undefined for the type UserEntity
The method getRoles() is undefined for the type UserEntity
The method getName() is undefined for the type Role

any help is appreciated. Thanks

Brd
Автор

Hey Teddy, instead of the method to convert the Roles into a Collection of GrantedAuthorities, can we just implement GrantedAuthority for our Role entity?

@Data
@NoArgsConstructor
@Entity
@Table(name = "role")
public class RoleEntity implements GrantedAuthority {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false, unique = true, updatable = false)
private int id;

@Column(name = "role")
private String role;

@Override
public String getAuthority() {
return this.role;
}
}

Perhaps something like this? SimpleGrantedAuthority, an object from Spring Security implements getAuthority this way :)

Just another approach!

TheGoodOleDays