Search in sources :

Example 1 with UserConsent

use of oidc.model.UserConsent in project OpenConext-oidcng by OpenConext.

the class ResourceCleanerTest method userConsent.

private UserConsent userConsent() {
    UserConsent userConsent = new UserConsent(new User("sub", "unspecifiedNameId", "http://mockidp", "clientId", Collections.emptyMap(), Collections.emptyList()), Arrays.asList("openid", "profile"), new OpenIDClient());
    Date lastAccessed = Date.from(new Date().toInstant().minus(365 * 10, ChronoUnit.DAYS).atZone(ZoneId.systemDefault()).toInstant());
    ReflectionTestUtils.setField(userConsent, "lastAccessed", lastAccessed);
    return userConsent;
}
Also used : User(oidc.model.User) OpenIDClient(oidc.model.OpenIDClient) UserConsent(oidc.model.UserConsent) Date(java.util.Date)

Aggregations

Date (java.util.Date)1 OpenIDClient (oidc.model.OpenIDClient)1 User (oidc.model.User)1 UserConsent (oidc.model.UserConsent)1