All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.canoo.platform.server.security.User Maven / Gradle / Ivy

Go to download

The Dolphin Platform is a framework that implements the presentation model pattern and provides amodern way to create enterprise applications. The Platform provides several client implementations that all canbe used in combination with a general sever API.

There is a newer version: 1.0.0.CR5
Show newest version
package com.canoo.platform.server.security;

import org.apiguardian.api.API;

import java.security.Principal;
import java.util.Optional;
import java.util.stream.Stream;

@API(since = "0.19.0", status = API.Status.EXPERIMENTAL)
public interface User extends Principal {

    String getUserName();

    Stream getRoles();

    String getEmail();

    default Optional email() {
        return Optional.ofNullable(getEmail());
    }

    String getFirstName();

    default Optional firstName() {
        return Optional.ofNullable(getFirstName());
    }

    String getLastName();

    default Optional lastName() {
        return Optional.ofNullable(getLastName());
    }

    default String getName() {
        return getUserName();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy