Package com.jgcomptech.tools.authz
Class SimpleAuthorizationInfo
- java.lang.Object
-
- com.jgcomptech.tools.authz.SimpleAuthorizationInfo
-
- All Implemented Interfaces:
AuthorizationInfo
,java.io.Serializable
public class SimpleAuthorizationInfo extends java.lang.Object implements AuthorizationInfo
A simple implementation of the AuthorizationInfo interface that stores roles and permissions as internal attributes.- Since:
- 1.5.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleAuthorizationInfo()
Default no-argument constructor.SimpleAuthorizationInfo(java.util.Set<java.lang.String> roles)
Creates a new instance with the specified roles and no permissions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.Set<java.lang.String>
getRoles()
Returns all assigned roles.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
SimpleAuthorizationInfo
public SimpleAuthorizationInfo()
Default no-argument constructor.
-
SimpleAuthorizationInfo
public SimpleAuthorizationInfo(java.util.Set<java.lang.String> roles)
Creates a new instance with the specified roles and no permissions.- Parameters:
roles
- the roles assigned to the realm account
-
-
Method Detail
-
getRoles
public java.util.Set<java.lang.String> getRoles()
Returns all assigned roles.- Specified by:
getRoles
in interfaceAuthorizationInfo
- Returns:
- all assigned roles
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-