An allegory is a symbolic representation, or speaks figuratively. It is a literary representation, the apparent or superficial sense of which both parallels and illustrates a deeper sense. An allegory usually occurs as an extended metaphor in narrative form.
Allegory is used in Psalm 80 and John 10:1-16.
In scripture the use of allegory is either specifically indicated or is indicated clearly through the context.