// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.server.core.auth;

import java.time.Instant;
import javax.annotation.Nullable;
import java.util.UUID;
import javax.annotation.Nonnull;

public interface IAuthCredentialStore
{
    void setTokens(@Nonnull final OAuthTokens p0);
    
    @Nonnull
    OAuthTokens getTokens();
    
    void setProfile(@Nullable final UUID p0);
    
    @Nullable
    UUID getProfile();
    
    void clear();
    
    record OAuthTokens(@Nullable String accessToken, @Nullable String refreshToken, @Nullable Instant accessTokenExpiresAt) {
        public boolean isValid() {
            return this.refreshToken != null;
        }
        
        @Nullable
        public String accessToken() {
            return this.accessToken;
        }
        
        @Nullable
        public String refreshToken() {
            return this.refreshToken;
        }
        
        @Nullable
        public Instant accessTokenExpiresAt() {
            return this.accessTokenExpiresAt;
        }
    }
}
