2022-02-17 14:59:59 +00:00
|
|
|
package profile
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2022-03-13 10:58:34 +00:00
|
|
|
"source.toby3d.me/toby3d/auth/internal/domain"
|
2022-02-17 14:59:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type UseCase interface {
|
|
|
|
Fetch(ctx context.Context, me *domain.Me) (*domain.Profile, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
var ErrScopeRequired error = domain.NewError(
|
|
|
|
domain.ErrorCodeInsufficientScope,
|
|
|
|
"token with 'profile' scopes is required to view profile data",
|
|
|
|
"https://indieauth.net/source/#user-information",
|
|
|
|
)
|