Example usage for org.springframework.security.core Authentication getAuthorities

List of usage examples for org.springframework.security.core Authentication getAuthorities

Introduction

In this page you can find the example usage for org.springframework.security.core Authentication getAuthorities.

Prototype

Collection<? extends GrantedAuthority> getAuthorities();

Source Link

Document

Set by an AuthenticationManager to indicate the authorities that the principal has been granted.

Usage

From source file:ro.cs.cm.web.security.CMRoleVoter.java

GrantedAuthority[] extractAuthorities(Authentication authentication) {
    return (GrantedAuthority[]) authentication.getAuthorities().toArray();
}