diff --git a/api/src/main/java/com/bivashy/auth/api/provider/LinkTypeProvider.java b/api/src/main/java/com/bivashy/auth/api/provider/LinkTypeProvider.java index fcfdf1aa..5c6e9721 100644 --- a/api/src/main/java/com/bivashy/auth/api/provider/LinkTypeProvider.java +++ b/api/src/main/java/com/bivashy/auth/api/provider/LinkTypeProvider.java @@ -1,5 +1,6 @@ package com.bivashy.auth.api.provider; +import java.util.Collection; import java.util.Optional; import com.bivashy.auth.api.link.LinkType; @@ -10,4 +11,6 @@ public interface LinkTypeProvider { void putLinkType(String linkName, LinkType linkType); Optional getLinkType(String name); + + Collection getLinkTypes(); } diff --git a/core/src/main/java/me/mastercapexd/auth/link/BaseLinkTypeProvider.java b/core/src/main/java/me/mastercapexd/auth/link/BaseLinkTypeProvider.java index bb3f6db9..2d1e3081 100644 --- a/core/src/main/java/me/mastercapexd/auth/link/BaseLinkTypeProvider.java +++ b/core/src/main/java/me/mastercapexd/auth/link/BaseLinkTypeProvider.java @@ -1,5 +1,6 @@ package me.mastercapexd.auth.link; +import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Optional; @@ -36,4 +37,9 @@ public void putLinkType(String name, LinkType linkType) { public Optional getLinkType(String name) { return Optional.ofNullable(linkTypeMap.getOrDefault(name, null)); } + + @Override + public Collection getLinkTypes() { + return linkTypeMap.values(); + } }